Raised This Month: $51 Target: $400
 12% 

dbi_close() and sql_close() mismatch?


  
 
 
Thread Tools Display Modes
Author Message
naz
Junior Member
Join Date: Feb 2005
Old 08-17-2005 , 09:41   dbi_close() and sql_close() mismatch?
#1

Not completely sure if I'm right here, but in mysql_amxx sql_close is defined like this (only listing declaration):
Code:
static cell AMX_NATIVE_CALL sql_close(AMX *amx, cell *params)
while in dbi.inc dbi_close is declared like this:
Code:
native dbi_close(&Sql:_sql);
sql_close() does return a value (1 or 0), whilst dbi_close() doesn't.
Is this an error, or just "meant to be"?
naz is offline
BAILOPAN
Join Date: Jan 2004
Old 08-17-2005 , 11:15  
#2

All natives have the same declaration in C. They're not a one to one correspondence like that.

static - the function is static
cell - the function returns a single cell
AMX_NATIVE_CALL - the calling convention the VM wants
sql_close - the function name
AMX *amx - the instance of the VM calling the native
cell *params - the array of parameters on the stack
__________________
egg
BAILOPAN is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode