Package org.javagi.gobject
Class BoxedUtil
java.lang.Object
org.javagi.gobject.BoxedUtil
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BoxedUtil
public BoxedUtil()
-
-
Method Details
-
isBoxed
-
copy
Make a copy ofstruct
. Iftype
is a boxed type, useg_boxed_copy
, or else,malloc
a new struct and copysize
bytes fromstruct
to it.- Parameters:
type
- the type, possibly a boxed typestruct
- the struct to be copiedsize
- the size of the struct (only used whentype
is not a boxed type)- Returns:
- the newly created copy of
struct
. The caller has ownership and is responsible for freeing it.
-
free
Freestruct
. Iftype
is a boxed type, useg_boxed_free
, or else, applyfreeFunc
onstruct
.- Parameters:
type
- the type, possibly a boxed typestruct
- the struct to be freedfreeFunc
- a function that will freestruct
(only used whentype
is not a boxed type)
-