CString
in C (char**
)c :: NativeCStringArray :: defaultinit
c :: NativeCStringArray :: new
Initialize a new NativeCStringArray ofsize
elements.
c $ NativeCStringArray :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
c :: NativeCArray :: defaultinit
core :: Pointer :: defaultinit
core :: Object :: defaultinit
c :: NativeCStringArray :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
c :: NativeCStringArray :: new
Initialize a new NativeCStringArray ofsize
elements.
core :: Object :: output_class_name
Display class name on stdout (debug only).c :: NativeCArray
A native C array, as in a pointer to the first element of the array
# An array of `CString` in C (`char**`)
extern class NativeCStringArray `{ char** `}
super NativeCArray
redef type E: CString
# Initialize a new NativeCStringArray of `size` elements.
new(size: Int) `{ return calloc(size, sizeof(char*)); `}
redef fun [](index) `{ return self[index]; `}
redef fun []=(index, val) `{ self[index] = val; `}
redef fun +(offset) `{ return self + offset; `}
end
lib/c/c.nit:233,1--245,3
# Wrapper for `char**`.
#
# Used to handle array of CString returned by MongoDB.
redef class NativeCStringArray
# Frees `self`.
#
# This instance should not be used beyond this point!
fun destroy `{ free(self); `}
end
lib/mongodb/native_mongodb.nit:148,1--156,3