Re: Array property of custom object
Mihai Dobrescu <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
On Monday, May 2, 2016 at 11:48:36 AM UTC+3, Mihai Dobrescu wrote: > On Monday, May 2, 2016 at 11:14:01 AM UTC+3, Boris Zbarsky wrote: > > On 4/30/16 1:41 PM, Mihai Dobrescu wrote: > > > Now, I need to define a property of array type. How could this be done? > > > > Other than with JS_NewArrayObject and JS_DefineProperty? Why do those > > not do what you want? > > > > -Boris > > Actually, I don't now how to use them. > So far, I have used JS_PSGS to define properties to a custom object having a JSClass structure defined simply, with a class name, a finalizer and JSCLASS_HAS_PRIVATE flag. Oh, I've forgot to mention that it has private data that owns the array, actually, defined like a char array[10]; That I need to access.