preparations for making 'closure' the default calling convention for proc types
This commit is contained in:
parent
56b4e3ad91
commit
8d99753d63
36 changed files with 117 additions and 102 deletions
|
|
@ -419,7 +419,7 @@ type
|
|||
pad32*: TFunction
|
||||
|
||||
TEventListener* = proc (para1: PObject){.cdecl.}
|
||||
TEventListenerInitProc* = proc ()
|
||||
TEventListenerInitProc* = proc (){.cdecl.}
|
||||
TEventListenerInit* = proc (para1: TEventListenerInitProc){.cdecl.}
|
||||
PKeyEventStruct* = ptr TKeyEventStruct
|
||||
TKeyEventStruct*{.final, pure.} = object
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ type
|
|||
PEvent* = ptr TEvent
|
||||
TEventFunc* = proc (event: PEvent, data: gpointer){.cdecl.}
|
||||
PXEvent* = ptr TXEvent
|
||||
TXEvent* = proc ()
|
||||
TXEvent* = proc () {.cdecl.}
|
||||
PFilterReturn* = ptr TFilterReturn
|
||||
TFilterReturn* = enum
|
||||
FILTER_CONTINUE, FILTER_TRANSLATE, FILTER_REMOVE
|
||||
|
|
@ -775,7 +775,7 @@ type
|
|||
PWindowObjectClass* = ptr TWindowObjectClass
|
||||
TWindowObjectClass* = object of TDrawableClass
|
||||
window_invalidate_maybe_recurse_child_func* = proc (para1: PWindow,
|
||||
para2: gpointer): gboolean
|
||||
para2: gpointer): gboolean {.cdecl.}
|
||||
|
||||
proc TYPE_COLORMAP*(): GType
|
||||
proc COLORMAP*(anObject: pointer): PColormap
|
||||
|
|
|
|||
|
|
@ -2676,7 +2676,7 @@ when false:
|
|||
proc g_critical*(format: cstring){.varargs.}
|
||||
proc g_warning*(format: cstring){.varargs.}
|
||||
type
|
||||
TGPrintFunc* = proc (str: cstring)
|
||||
TGPrintFunc* = proc (str: cstring){.cdecl, varargs.}
|
||||
|
||||
proc g_set_print_handler*(func: TGPrintFunc): TGPrintFunc{.cdecl,
|
||||
dynlib: gliblib, importc: "g_set_print_handler".}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ type
|
|||
Tfree_callback* = proc (p: pointer){.cdecl.}
|
||||
Trealloc_callback* = proc (p: pointer, size: int): pointer{.cdecl.}
|
||||
Tstrdup_callback* = proc (str: cstring): cstring{.cdecl.}
|
||||
Tcalloc_callback* = proc (nmemb: int, size: int): pointer
|
||||
Tcalloc_callback* = proc (nmemb: int, size: int): pointer{.noconv.}
|
||||
Tinfotype* = enum
|
||||
INFO_TEXT = 0, INFO_HEADER_IN, INFO_HEADER_OUT, INFO_DATA_IN, INFO_DATA_OUT,
|
||||
INFO_SSL_DATA_IN, INFO_SSL_DATA_OUT, INFO_END
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#
|
||||
|
||||
{.deadCodeElim: on.}
|
||||
{.push, callconv: cdecl.}
|
||||
|
||||
when defined(Unix):
|
||||
const
|
||||
lib = "libmysqlclient.so.15"
|
||||
|
|
@ -1071,3 +1073,5 @@ proc INTERNAL_NUM_FIELD(f: Pst_mysql_field): bool =
|
|||
|
||||
proc reload(mysql: PMySQL): cint =
|
||||
result = refresh(mysql, REFRESH_GRANT)
|
||||
|
||||
{.pop.}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@
|
|||
import
|
||||
GL
|
||||
|
||||
when defined(windows):
|
||||
{.push, callconv: stdcall.}
|
||||
else:
|
||||
{.push, callconv: cdecl.}
|
||||
|
||||
when defined(windows):
|
||||
const
|
||||
dllname = "glu32.dll"
|
||||
|
|
@ -326,4 +331,5 @@ const # Contours types -- obsolete!
|
|||
GLU_ERROR* = GLU_TESS_ERROR
|
||||
GLU_EDGE_FLAG* = GLU_TESS_EDGE_FLAG
|
||||
|
||||
{.pop.}
|
||||
# implementation
|
||||
|
|
|
|||
|
|
@ -1156,7 +1156,7 @@ proc PyWeakref_NewProxy*(ob, callback: PPyObject): PPyObject{.cdecl, importc, dy
|
|||
proc PyWeakref_NewRef*(ob, callback: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.}
|
||||
proc PyWrapper_New*(ob1, ob2: PPyObject): PPyObject{.cdecl, importc, dynlib: dllname.}
|
||||
proc PyBool_FromLong*(ok: int): PPyObject{.cdecl, importc, dynlib: dllname.} #-
|
||||
proc Py_AtExit*(prc: proc ()): int{.cdecl, importc, dynlib: dllname.} #-
|
||||
proc Py_AtExit*(prc: proc () {.cdecl.}): int{.cdecl, importc, dynlib: dllname.} #-
|
||||
#Py_Cleanup:procedure; cdecl, importc, dynlib: dllname;
|
||||
#-
|
||||
proc Py_CompileString*(s1, s2: cstring, i: int): PPyObject{.cdecl, importc, dynlib: dllname.} #-
|
||||
|
|
|
|||
|
|
@ -1279,7 +1279,6 @@ type # This is the system-independent thread info struc
|
|||
TByteArray* = array[0..32767, int8]
|
||||
PWordArray* = ptr TWordArray
|
||||
TWordArray* = array[0..16383, int16] # Generic procedure pointer
|
||||
TProcedure* = proc ()
|
||||
|
||||
type TEventSeq = set[TEventKind]
|
||||
template evconv(procName: expr, ptrName: typeDesc, assertions: TEventSeq): stmt {.immediate.} =
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ const
|
|||
XrmEnumOneLevel* = 1
|
||||
|
||||
type
|
||||
funcbool* = proc (): TBool
|
||||
funcbool* = proc (): TBool {.cdecl.}
|
||||
|
||||
proc XrmEnumerateDatabase*(para1: TXrmDatabase, para2: TXrmNameList,
|
||||
para3: TXrmClassList, para4: int32, para5: funcbool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue