factor: DESTRUCTOR: -> destructor:
parent
d976ffa34b
commit
3efabac7ff
|
@ -34,7 +34,7 @@ in: io.files.acls.macosx
|
||||||
|
|
||||||
: free-acl ( acl -- ) acl_free acl-error ;
|
: free-acl ( acl -- ) acl_free acl-error ;
|
||||||
|
|
||||||
DESTRUCTOR: free-acl
|
destructor: free-acl
|
||||||
|
|
||||||
: get-acl-entry ( acl_t n -- acl_entry_t )
|
: get-acl-entry ( acl_t n -- acl_entry_t )
|
||||||
f acl_entry_t <ref> [ acl_get_entry ] keep swap -1 = [ drop f ] when ;
|
f acl_entry_t <ref> [ acl_get_entry ] keep swap -1 = [ drop f ] when ;
|
||||||
|
|
|
@ -92,7 +92,7 @@ FUNCTION: cairo_t* cairo_reference ( cairo_t* cr ) ;
|
||||||
|
|
||||||
FUNCTION: void cairo_destroy ( cairo_t* cr ) ;
|
FUNCTION: void cairo_destroy ( cairo_t* cr ) ;
|
||||||
|
|
||||||
DESTRUCTOR: cairo_destroy
|
destructor: cairo_destroy
|
||||||
|
|
||||||
FUNCTION: uint cairo_get_reference_count ( cairo_t* cr ) ;
|
FUNCTION: uint cairo_get_reference_count ( cairo_t* cr ) ;
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ FUNCTION: void cairo_surface_finish ( cairo_surface_t* surface ) ;
|
||||||
|
|
||||||
FUNCTION: void cairo_surface_destroy ( cairo_surface_t* surface ) ;
|
FUNCTION: void cairo_surface_destroy ( cairo_surface_t* surface ) ;
|
||||||
|
|
||||||
DESTRUCTOR: cairo_surface_destroy
|
destructor: cairo_surface_destroy
|
||||||
|
|
||||||
FUNCTION: uint cairo_surface_get_reference_count ( cairo_surface_t* surface ) ;
|
FUNCTION: uint cairo_surface_get_reference_count ( cairo_surface_t* surface ) ;
|
||||||
|
|
||||||
|
|
|
@ -40,4 +40,4 @@ FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf ) ;
|
||||||
|
|
||||||
FUNCTION: void CFRelease ( CFTypeRef cf ) ;
|
FUNCTION: void CFRelease ( CFTypeRef cf ) ;
|
||||||
|
|
||||||
DESTRUCTOR: CFRelease
|
destructor: CFRelease
|
||||||
|
|
|
@ -69,11 +69,11 @@ FUNCTION: CGImageRef CGBitmapContextCreateImage (
|
||||||
|
|
||||||
FUNCTION: void CGColorSpaceRelease ( CGColorSpaceRef ref ) ;
|
FUNCTION: void CGColorSpaceRelease ( CGColorSpaceRef ref ) ;
|
||||||
|
|
||||||
DESTRUCTOR: CGColorSpaceRelease
|
destructor: CGColorSpaceRelease
|
||||||
|
|
||||||
FUNCTION: void CGContextRelease ( CGContextRef ref ) ;
|
FUNCTION: void CGContextRelease ( CGContextRef ref ) ;
|
||||||
|
|
||||||
DESTRUCTOR: CGContextRelease
|
destructor: CGContextRelease
|
||||||
|
|
||||||
FUNCTION: void CGContextSetRGBStrokeColor (
|
FUNCTION: void CGContextSetRGBStrokeColor (
|
||||||
CGContextRef c,
|
CGContextRef c,
|
||||||
|
|
|
@ -23,8 +23,8 @@ in: cuda.contexts
|
||||||
: clean-up-context ( context -- )
|
: clean-up-context ( context -- )
|
||||||
[ sync-context ] ignore-errors destroy-context ; inline
|
[ sync-context ] ignore-errors destroy-context ; inline
|
||||||
|
|
||||||
DESTRUCTOR: destroy-context
|
destructor: destroy-context
|
||||||
DESTRUCTOR: clean-up-context
|
destructor: clean-up-context
|
||||||
|
|
||||||
: (with-cuda-context) ( context quot -- )
|
: (with-cuda-context) ( context quot -- )
|
||||||
swap '[ _ clean-up-context ] [ ] cleanup ; inline
|
swap '[ _ clean-up-context ] [ ] cleanup ; inline
|
||||||
|
|
|
@ -30,12 +30,12 @@ in: cuda.gl
|
||||||
: unmap-resource ( resource -- )
|
: unmap-resource ( resource -- )
|
||||||
1 swap void* <ref> f cuGraphicsUnmapResources cuda-error ; inline
|
1 swap void* <ref> f cuGraphicsUnmapResources cuda-error ; inline
|
||||||
|
|
||||||
DESTRUCTOR: unmap-resource
|
destructor: unmap-resource
|
||||||
|
|
||||||
: free-resource ( resource -- )
|
: free-resource ( resource -- )
|
||||||
cuGraphicsUnregisterResource cuda-error ; inline
|
cuGraphicsUnregisterResource cuda-error ; inline
|
||||||
|
|
||||||
DESTRUCTOR: free-resource
|
destructor: free-resource
|
||||||
|
|
||||||
: with-mapped-resource ( ..a resource quot: ( ..a device-ptr size -- ..b ) -- ..b )
|
: with-mapped-resource ( ..a resource quot: ( ..a device-ptr size -- ..b ) -- ..b )
|
||||||
over [ map-resource ] 2dip '[ _ unmap-resource ] [ ] cleanup ; inline
|
over [ map-resource ] 2dip '[ _ unmap-resource ] [ ] cleanup ; inline
|
||||||
|
|
|
@ -17,7 +17,7 @@ in: cuda.memory
|
||||||
: cuda-free ( ptr -- )
|
: cuda-free ( ptr -- )
|
||||||
cuMemFree cuda-error ; inline
|
cuMemFree cuda-error ; inline
|
||||||
|
|
||||||
DESTRUCTOR: cuda-free
|
destructor: cuda-free
|
||||||
|
|
||||||
: memcpy-device>device ( dest-ptr src-ptr count -- )
|
: memcpy-device>device ( dest-ptr src-ptr count -- )
|
||||||
cuMemcpyDtoD cuda-error ; inline
|
cuMemcpyDtoD cuda-error ; inline
|
||||||
|
|
|
@ -10,9 +10,9 @@ in: curl
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
DESTRUCTOR: curl_easy_cleanup
|
destructor: curl_easy_cleanup
|
||||||
|
|
||||||
DESTRUCTOR: fclose
|
destructor: fclose
|
||||||
|
|
||||||
: check-code ( code -- )
|
: check-code ( code -- )
|
||||||
CURLE_OK assert= ;
|
CURLE_OK assert= ;
|
||||||
|
|
|
@ -21,9 +21,9 @@ M: ec-key dispose
|
||||||
: ec-key-handle ( -- handle )
|
: ec-key-handle ( -- handle )
|
||||||
ec-key get dup handle>> [ nip ] [ already-disposed ] if* ;
|
ec-key get dup handle>> [ nip ] [ already-disposed ] if* ;
|
||||||
|
|
||||||
DESTRUCTOR: BN_clear_free
|
destructor: BN_clear_free
|
||||||
|
|
||||||
DESTRUCTOR: EC_POINT_clear_free
|
destructor: EC_POINT_clear_free
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
|
|
@ -40,4 +40,4 @@ FUNCTION: void fftw_execute ( fftw_plan p ) ;
|
||||||
|
|
||||||
FUNCTION: void fftw_free ( void* p ) ;
|
FUNCTION: void fftw_free ( void* p ) ;
|
||||||
|
|
||||||
DESTRUCTOR: fftw_free
|
destructor: fftw_free
|
||||||
|
|
|
@ -64,7 +64,7 @@ symbol: current-dbf
|
||||||
[ block-size>> ] [ get-flag ] [ mode>> ]
|
[ block-size>> ] [ get-flag ] [ mode>> ]
|
||||||
} cleave f gdbm_open [ gdbm-throw ] unless* ;
|
} cleave f gdbm_open [ gdbm-throw ] unless* ;
|
||||||
|
|
||||||
DESTRUCTOR: gdbm-close
|
destructor: gdbm-close
|
||||||
|
|
||||||
: object>datum ( obj -- datum )
|
: object>datum ( obj -- datum )
|
||||||
object>bytes [ malloc-byte-array &free ] [ length ] bi
|
object>bytes [ malloc-byte-array &free ] [ length ] bi
|
||||||
|
|
|
@ -38,7 +38,7 @@ FOREIGN-ENUM-TYPE: cairo.Content cairo_content_t
|
||||||
|
|
||||||
GIR: vocab:gdk/Gdk-3.0.gir
|
GIR: vocab:gdk/Gdk-3.0.gir
|
||||||
|
|
||||||
DESTRUCTOR: gdk_cursor_unref
|
destructor: gdk_cursor_unref
|
||||||
|
|
||||||
STRUCT: GdkEventButton
|
STRUCT: GdkEventButton
|
||||||
{ type GdkEventType }
|
{ type GdkEventType }
|
||||||
|
|
|
@ -31,8 +31,8 @@ CONSTANT: G_MAXUINT64 0xffffffffffffffff ;
|
||||||
|
|
||||||
GIR: vocab:glib/GLib-2.0.gir
|
GIR: vocab:glib/GLib-2.0.gir
|
||||||
|
|
||||||
DESTRUCTOR: g_source_unref
|
destructor: g_source_unref
|
||||||
DESTRUCTOR: g_free
|
destructor: g_free
|
||||||
|
|
||||||
CALLBACK: gboolean GSourceFuncsPrepareFunc ( GSource* source, gint* timeout_ ) ;
|
CALLBACK: gboolean GSourceFuncsPrepareFunc ( GSource* source, gint* timeout_ ) ;
|
||||||
CALLBACK: gboolean GSourceFuncsCheckFunc ( GSource* source ) ;
|
CALLBACK: gboolean GSourceFuncsCheckFunc ( GSource* source ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ forget: G_IO_ERR
|
||||||
forget: G_IO_HUP
|
forget: G_IO_HUP
|
||||||
forget: G_IO_NVAL
|
forget: G_IO_NVAL
|
||||||
|
|
||||||
DESTRUCTOR: g_object_unref
|
destructor: g_object_unref
|
||||||
|
|
||||||
CONSTANT: G_TYPE_INVALID $[ 0 2 shift ] ;
|
CONSTANT: G_TYPE_INVALID $[ 0 2 shift ] ;
|
||||||
CONSTANT: G_TYPE_NONE $[ 1 2 shift ] ;
|
CONSTANT: G_TYPE_NONE $[ 1 2 shift ] ;
|
||||||
|
|
|
@ -25,7 +25,7 @@ IMPLEMENT-STRUCTS: GtkTreeIter ;
|
||||||
|
|
||||||
GIR: vocab:gtk/Gtk-3.0.gir
|
GIR: vocab:gtk/Gtk-3.0.gir
|
||||||
|
|
||||||
DESTRUCTOR: gtk_widget_destroy
|
destructor: gtk_widget_destroy
|
||||||
|
|
||||||
! <workaround
|
! <workaround
|
||||||
forget: gtk_im_context_get_preedit_string
|
forget: gtk_im_context_get_preedit_string
|
||||||
|
|
|
@ -23,7 +23,7 @@ FUNCTION: int getifaddrs ( ifaddrs** ifap ) ;
|
||||||
|
|
||||||
FUNCTION: void freeifaddrs ( ifaddrs* ifp ) ;
|
FUNCTION: void freeifaddrs ( ifaddrs* ifp ) ;
|
||||||
|
|
||||||
DESTRUCTOR: freeifaddrs
|
destructor: freeifaddrs
|
||||||
|
|
||||||
: interface-names ( -- ifaddrs )
|
: interface-names ( -- ifaddrs )
|
||||||
[
|
[
|
||||||
|
|
|
@ -66,5 +66,5 @@ FUNCTION: ssize_t tls_read ( tls_ctx* ctx, void* buf, size_t buflen ) ;
|
||||||
FUNCTION: ssize_t tls_write ( tls_ctx* ctx, void* buf, size_t buflen ) ;
|
FUNCTION: ssize_t tls_write ( tls_ctx* ctx, void* buf, size_t buflen ) ;
|
||||||
FUNCTION: int tls_close ( tls_ctx* ctx ) ;
|
FUNCTION: int tls_close ( tls_ctx* ctx ) ;
|
||||||
|
|
||||||
DESTRUCTOR: tls_config_free
|
destructor: tls_config_free
|
||||||
DESTRUCTOR: tls_free
|
destructor: tls_free
|
||||||
|
|
|
@ -244,8 +244,8 @@ FUNCTION: void alcCaptureStart ( ALCdevice* device ) ;
|
||||||
FUNCTION: void alcCaptureStop ( ALCdevice* device ) ;
|
FUNCTION: void alcCaptureStop ( ALCdevice* device ) ;
|
||||||
FUNCTION: void alcCaptureSamples ( ALCdevice* device, void* buf, ALCsizei samps ) ;
|
FUNCTION: void alcCaptureSamples ( ALCdevice* device, void* buf, ALCsizei samps ) ;
|
||||||
|
|
||||||
DESTRUCTOR: alcCloseDevice*
|
destructor: alcCloseDevice*
|
||||||
DESTRUCTOR: alcDestroyContext
|
destructor: alcDestroyContext
|
||||||
|
|
||||||
: gen-sources ( size -- seq )
|
: gen-sources ( size -- seq )
|
||||||
dup uint <c-array> [ alGenSources ] keep ;
|
dup uint <c-array> [ alGenSources ] keep ;
|
||||||
|
|
|
@ -267,9 +267,9 @@ FUNCTION: GLint gluUnProject ( GLdouble winX, GLdouble winY, GLdouble winZ, GLdo
|
||||||
! FUNCTION: GLboolean gluCheckExtension ( GLubyte* extName, GLubyte* extString ) ;
|
! FUNCTION: GLboolean gluCheckExtension ( GLubyte* extName, GLubyte* extString ) ;
|
||||||
! FUNCTION: GLint gluUnProject4 ( GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, GLdouble* model, GLdouble* proj, GLint* view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW ) ;
|
! FUNCTION: GLint gluUnProject4 ( GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, GLdouble* model, GLdouble* proj, GLint* view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW ) ;
|
||||||
|
|
||||||
DESTRUCTOR: gluDeleteNurbsRenderer
|
destructor: gluDeleteNurbsRenderer
|
||||||
DESTRUCTOR: gluDeleteQuadric
|
destructor: gluDeleteQuadric
|
||||||
DESTRUCTOR: gluDeleteTess
|
destructor: gluDeleteTess
|
||||||
|
|
||||||
CALLBACK: void GLUtessBeginCallback ( GLenum type ) ;
|
CALLBACK: void GLUtessBeginCallback ( GLenum type ) ;
|
||||||
CALLBACK: void GLUtessBeginDataCallback ( GLenum type, void* data ) ;
|
CALLBACK: void GLUtessBeginDataCallback ( GLenum type, void* data ) ;
|
||||||
|
|
|
@ -206,7 +206,7 @@ FUNCTION: void* BN_bin2bn ( void* s, int len, void* ret ) ;
|
||||||
FUNCTION: int BN_bn2bin ( void* a, void* to ) ;
|
FUNCTION: int BN_bn2bin ( void* a, void* to ) ;
|
||||||
|
|
||||||
FUNCTION: void BN_clear_free ( void* a ) ;
|
FUNCTION: void BN_clear_free ( void* a ) ;
|
||||||
DESTRUCTOR: BN_clear_free
|
destructor: BN_clear_free
|
||||||
|
|
||||||
! ===============================================
|
! ===============================================
|
||||||
! ec.h
|
! ec.h
|
||||||
|
|
|
@ -615,7 +615,7 @@ FUNCTION: X509_NAME* X509_get_subject_name ( X509* a ) ;
|
||||||
FUNCTION: int X509_check_trust ( X509* a, int id, int flags ) ;
|
FUNCTION: int X509_check_trust ( X509* a, int id, int flags ) ;
|
||||||
FUNCTION: X509_EXTENSION* X509_get_ext ( X509* a, int loc ) ;
|
FUNCTION: X509_EXTENSION* X509_get_ext ( X509* a, int loc ) ;
|
||||||
FUNCTION: void X509_free ( X509 *a ) ;
|
FUNCTION: void X509_free ( X509 *a ) ;
|
||||||
DESTRUCTOR: X509_free
|
destructor: X509_free
|
||||||
|
|
||||||
C-TYPE: X509_STORE
|
C-TYPE: X509_STORE
|
||||||
FUNCTION: X509_STORE* X509_STORE_new ( ) ;
|
FUNCTION: X509_STORE* X509_STORE_new ( ) ;
|
||||||
|
|
|
@ -19,8 +19,8 @@ IMPLEMENT-STRUCTS: PangoRectangle ;
|
||||||
|
|
||||||
GIR: vocab:pango/Pango-1.0.gir
|
GIR: vocab:pango/Pango-1.0.gir
|
||||||
|
|
||||||
DESTRUCTOR: pango_font_description_free
|
destructor: pango_font_description_free
|
||||||
DESTRUCTOR: pango_layout_iter_free
|
destructor: pango_layout_iter_free
|
||||||
|
|
||||||
! <workaround
|
! <workaround
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ FUNCTION: int PyType_Check ( PyObject* obj ) ;
|
||||||
! Reference counting
|
! Reference counting
|
||||||
FUNCTION: void Py_IncRef ( PyObject* o ) ;
|
FUNCTION: void Py_IncRef ( PyObject* o ) ;
|
||||||
FUNCTION: void Py_DecRef ( PyObject* o ) ;
|
FUNCTION: void Py_DecRef ( PyObject* o ) ;
|
||||||
DESTRUCTOR: Py_DecRef
|
destructor: Py_DecRef
|
||||||
|
|
||||||
! Reflection
|
! Reflection
|
||||||
FUNCTION: c-string PyEval_GetFuncName ( PyObject* func ) ;
|
FUNCTION: c-string PyEval_GetFuncName ( PyObject* func ) ;
|
||||||
|
|
|
@ -99,4 +99,4 @@ ERROR: null-com-release ;
|
||||||
: with-com-interface ( interface quot -- )
|
: with-com-interface ( interface quot -- )
|
||||||
over [ com-release ] curry [ ] cleanup ; inline
|
over [ com-release ] curry [ ] cleanup ; inline
|
||||||
|
|
||||||
DESTRUCTOR: com-release
|
destructor: com-release
|
||||||
|
|
|
@ -1415,11 +1415,11 @@ FUNCTION: HBRUSH CreateSolidBrush ( COLORREF colorref ) ;
|
||||||
! FUNCTION: DdEntry9
|
! FUNCTION: DdEntry9
|
||||||
! FUNCTION: DeleteColorSpace
|
! FUNCTION: DeleteColorSpace
|
||||||
FUNCTION: BOOL DeleteDC ( HDC hdc ) ;
|
FUNCTION: BOOL DeleteDC ( HDC hdc ) ;
|
||||||
DESTRUCTOR: DeleteDC
|
destructor: DeleteDC
|
||||||
! FUNCTION: DeleteEnhMetaFile
|
! FUNCTION: DeleteEnhMetaFile
|
||||||
! FUNCTION: DeleteMetaFile
|
! FUNCTION: DeleteMetaFile
|
||||||
FUNCTION: BOOL DeleteObject ( HGDIOBJ hObject ) ;
|
FUNCTION: BOOL DeleteObject ( HGDIOBJ hObject ) ;
|
||||||
DESTRUCTOR: DeleteObject
|
destructor: DeleteObject
|
||||||
FUNCTION: int DescribePixelFormat ( HDC hdc, int iPixelFormat, UINT nBytes, PIXELFORMATDESCRIPTOR* ppfd ) ;
|
FUNCTION: int DescribePixelFormat ( HDC hdc, int iPixelFormat, UINT nBytes, PIXELFORMATDESCRIPTOR* ppfd ) ;
|
||||||
! FUNCTION: DeviceCapabilitiesExA
|
! FUNCTION: DeviceCapabilitiesExA
|
||||||
! FUNCTION: DeviceCapabilitiesExW
|
! FUNCTION: DeviceCapabilitiesExW
|
||||||
|
|
|
@ -10,7 +10,7 @@ LIBRARY: gdiplus
|
||||||
FUNCTION: void* GdipAlloc ( SIZE_T size ) ;
|
FUNCTION: void* GdipAlloc ( SIZE_T size ) ;
|
||||||
FUNCTION: void GdipFree ( void* mem ) ;
|
FUNCTION: void GdipFree ( void* mem ) ;
|
||||||
|
|
||||||
DESTRUCTOR: GdipFree
|
destructor: GdipFree
|
||||||
|
|
||||||
TYPEDEF: float REAL
|
TYPEDEF: float REAL
|
||||||
|
|
||||||
|
@ -1631,4 +1631,4 @@ CONSTANT: standard-gdi+-startup-input
|
||||||
: stop-gdi+ ( token -- )
|
: stop-gdi+ ( token -- )
|
||||||
GdiplusShutdown ;
|
GdiplusShutdown ;
|
||||||
|
|
||||||
DESTRUCTOR: stop-gdi+
|
destructor: stop-gdi+
|
||||||
|
|
|
@ -266,7 +266,7 @@ FUNCTION: HRESULT ScriptStringFree (
|
||||||
SCRIPT_STRING_ANALYSIS* pssa
|
SCRIPT_STRING_ANALYSIS* pssa
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
DESTRUCTOR: ScriptStringFree
|
destructor: ScriptStringFree
|
||||||
|
|
||||||
FUNCTION: SIZE* ScriptString_pSize ( SCRIPT_STRING_ANALYSIS ssa ) ;
|
FUNCTION: SIZE* ScriptString_pSize ( SCRIPT_STRING_ANALYSIS ssa ) ;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ ERROR: invalid-demangle-args name ;
|
||||||
: mangled-name? ( name -- ? )
|
: mangled-name? ( name -- ? )
|
||||||
"_Z" head? ;
|
"_Z" head? ;
|
||||||
|
|
||||||
DESTRUCTOR: (free)
|
destructor: (free)
|
||||||
|
|
||||||
:: demangle ( mangled-name -- c++-name )
|
:: demangle ( mangled-name -- c++-name )
|
||||||
0 ulong <ref> :> length
|
0 ulong <ref> :> length
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
in: alien.destructors
|
in: alien.destructors
|
||||||
USING: help.markup help.syntax alien destructors ;
|
USING: help.markup help.syntax alien destructors ;
|
||||||
|
|
||||||
HELP: DESTRUCTOR:
|
HELP: destructor:
|
||||||
{ $syntax "DESTRUCTOR: word" }
|
{ $syntax "destructor: word" }
|
||||||
{ $description "Defines four things:"
|
{ $description "Defines four things:"
|
||||||
{ $list
|
{ $list
|
||||||
{ "a tuple named " { $snippet "word" } " with a single slot holding a " { $link c-ptr } }
|
{ "a tuple named " { $snippet "word" } " with a single slot holding a " { $link c-ptr } }
|
||||||
|
@ -15,7 +15,7 @@ HELP: DESTRUCTOR:
|
||||||
"Suppose you are writing a binding to the GLib library, which as a " { $snippet "g_object_unref" } " function. Then you can define the function and destructor like so,"
|
"Suppose you are writing a binding to the GLib library, which as a " { $snippet "g_object_unref" } " function. Then you can define the function and destructor like so,"
|
||||||
{ $code
|
{ $code
|
||||||
"FUNCTION: void g_object_unref ( gpointer object ) ;"
|
"FUNCTION: void g_object_unref ( gpointer object ) ;"
|
||||||
"DESTRUCTOR: g_object_unref"
|
"destructor: g_object_unref"
|
||||||
}
|
}
|
||||||
"Now, memory management becomes easier:"
|
"Now, memory management becomes easier:"
|
||||||
{ $code
|
{ $code
|
||||||
|
@ -25,6 +25,6 @@ HELP: DESTRUCTOR:
|
||||||
|
|
||||||
ARTICLE: "alien.destructors" "Alien destructors"
|
ARTICLE: "alien.destructors" "Alien destructors"
|
||||||
"The " { $vocab-link "alien.destructors" } " vocabulary defines a utility parsing word for defining new disposable classes."
|
"The " { $vocab-link "alien.destructors" } " vocabulary defines a utility parsing word for defining new disposable classes."
|
||||||
{ $subsections postpone: DESTRUCTOR: } ;
|
{ $subsections postpone: destructor: } ;
|
||||||
|
|
||||||
ABOUT: "alien.destructors"
|
ABOUT: "alien.destructors"
|
||||||
|
|
|
@ -29,4 +29,4 @@ M: F-destructor dispose alien>> F N ndrop ;
|
||||||
|
|
||||||
;FUNCTOR
|
;FUNCTOR
|
||||||
|
|
||||||
SYNTAX: DESTRUCTOR: scan-word define-destructor ;
|
SYNTAX: destructor: scan-word define-destructor ;
|
||||||
|
|
|
@ -32,7 +32,7 @@ PRIVATE>
|
||||||
: release-alien-handle ( int -- )
|
: release-alien-handle ( int -- )
|
||||||
alien-handles get-global delete-at ; inline
|
alien-handles get-global delete-at ; inline
|
||||||
|
|
||||||
DESTRUCTOR: release-alien-handle
|
destructor: release-alien-handle
|
||||||
|
|
||||||
: <alien-handle-ptr> ( object -- void* )
|
: <alien-handle-ptr> ( object -- void* )
|
||||||
<alien-handle> <alien> ; inline
|
<alien-handle> <alien> ; inline
|
||||||
|
@ -45,4 +45,4 @@ DESTRUCTOR: release-alien-handle
|
||||||
: release-alien-handle-ptr ( alien -- )
|
: release-alien-handle-ptr ( alien -- )
|
||||||
alien-address release-alien-handle ; inline
|
alien-address release-alien-handle ; inline
|
||||||
|
|
||||||
DESTRUCTOR: release-alien-handle-ptr
|
destructor: release-alien-handle-ptr
|
||||||
|
|
|
@ -117,7 +117,7 @@ FUNCTION: size_t strlen ( c-string alien ) ;
|
||||||
|
|
||||||
FUNCTION: int system ( c-string command ) ;
|
FUNCTION: int system ( c-string command ) ;
|
||||||
|
|
||||||
DESTRUCTOR: free
|
destructor: free
|
||||||
|
|
||||||
! For libc.linux, libc.windows, libc.macosx...
|
! For libc.linux, libc.windows, libc.macosx...
|
||||||
<< "libc." os name>> append require >>
|
<< "libc." os name>> append require >>
|
||||||
|
|
|
@ -52,4 +52,4 @@ FUNCTION: int magic_compile ( magic_t magic, c-string path ) ;
|
||||||
FUNCTION: int magic_check ( magic_t magic, c-string path ) ;
|
FUNCTION: int magic_check ( magic_t magic, c-string path ) ;
|
||||||
FUNCTION: int magic_errno ( magic_t magic ) ;
|
FUNCTION: int magic_errno ( magic_t magic ) ;
|
||||||
|
|
||||||
DESTRUCTOR: magic_close
|
destructor: magic_close
|
||||||
|
|
|
@ -235,7 +235,7 @@ STRUCT: yaml_token_t
|
||||||
! */
|
! */
|
||||||
|
|
||||||
FUNCTION: void yaml_token_delete ( yaml_token_t *token ) ;
|
FUNCTION: void yaml_token_delete ( yaml_token_t *token ) ;
|
||||||
DESTRUCTOR: yaml_token_delete
|
destructor: yaml_token_delete
|
||||||
|
|
||||||
! /** @} */
|
! /** @} */
|
||||||
|
|
||||||
|
@ -518,7 +518,7 @@ yaml_mapping_end_event_initialize ( yaml_event_t *event ) ;
|
||||||
|
|
||||||
FUNCTION: void
|
FUNCTION: void
|
||||||
yaml_event_delete ( yaml_event_t *event ) ;
|
yaml_event_delete ( yaml_event_t *event ) ;
|
||||||
DESTRUCTOR: yaml_event_delete
|
destructor: yaml_event_delete
|
||||||
|
|
||||||
! /** @} */
|
! /** @} */
|
||||||
|
|
||||||
|
@ -686,7 +686,7 @@ yaml_document_initialize ( yaml_document_t *document,
|
||||||
|
|
||||||
FUNCTION: void
|
FUNCTION: void
|
||||||
yaml_document_delete ( yaml_document_t *document ) ;
|
yaml_document_delete ( yaml_document_t *document ) ;
|
||||||
DESTRUCTOR: yaml_document_delete
|
destructor: yaml_document_delete
|
||||||
|
|
||||||
! /**
|
! /**
|
||||||
! * Get a node of a YAML document.
|
! * Get a node of a YAML document.
|
||||||
|
@ -1053,7 +1053,7 @@ yaml_parser_initialize ( yaml_parser_t *parser ) ;
|
||||||
|
|
||||||
FUNCTION: void
|
FUNCTION: void
|
||||||
yaml_parser_delete ( yaml_parser_t *parser ) ;
|
yaml_parser_delete ( yaml_parser_t *parser ) ;
|
||||||
DESTRUCTOR: yaml_parser_delete
|
destructor: yaml_parser_delete
|
||||||
|
|
||||||
! /**
|
! /**
|
||||||
! * Set a string input.
|
! * Set a string input.
|
||||||
|
@ -1412,7 +1412,7 @@ yaml_emitter_initialize ( yaml_emitter_t *emitter ) ;
|
||||||
|
|
||||||
FUNCTION: void
|
FUNCTION: void
|
||||||
yaml_emitter_delete ( yaml_emitter_t *emitter ) ;
|
yaml_emitter_delete ( yaml_emitter_t *emitter ) ;
|
||||||
DESTRUCTOR: yaml_emitter_delete
|
destructor: yaml_emitter_delete
|
||||||
|
|
||||||
! /**
|
! /**
|
||||||
! * Set a string output.
|
! * Set a string output.
|
||||||
|
|
Loading…
Reference in New Issue