1 # Copyright (C) 2002-2007, The Perl Foundation.
4 # Function signature declarations for Parrot Native Call Interface.
5 # The first alphanumeric is the type of the return value,
6 # the other alphanumerics denote the input parameter types.
23 # S - pointer to a STRING-register
24 # t - character string (0-terminated)
25 # Buffers are not valid return parameters,
26 # use 'p' when the native function returns a pointer value
31 # P - pointer to a PMC-register
32 # O - pointer to PMC-register (object)
33 # p - data pointer from PMC (on store into a new UnManagedStruct PMC)
34 # 2 - pointer to short
42 # 0 - insert a NULL (pointer) - doesn't comsume a register
43 # J - Parrot_Interp param
48 # U - Single PMC parameter to pass into callback - user data
56 d JOd # Parrot builtins
58 S JOS # ParrotIO.readline
59 I JI # Parrot_is_char_*
61 v JOS # String.reverse
62 P JOS # Added for os.stat
64 P JOPS # Namespace.get_global
65 v JOPSP # Namespace.set_global
72 v JPP # inplace infix MMD
77 P JPPP # infix MMD new
164 P Ji # Needed for parrot threads
165 P JOl # Parrot builtins
166 P JOP # PerlHash fromkeys, obsolete
201 v Jiiip # examples/japh/japh11.pasm
202 v JOP # Needed for parrot threads
214 # These are needed for parrotio.pmc
223 # Needed by string.pmc
233 # Needed by integer.pmc
237 # the following are use by t/pmc/nci.t
257 # Oddball ones for postgres
258 p ptippppi PQexecParams
261 p ptipppi PQexecPrepared
262 p ppP PQsetNoticeReceiver
264 # The following are used by library/pcre.pir
285 #required for mod_parrot
325 # Sub.__get_regs_used
331 # Added for .NET => PIR translator dynamic PMCs.
340 # Make lua stop panic'ing.
344 # ParrotThread creation
354 # --- start mysqlclient library ---
355 # Created from mysql.h using the following manual method:
356 # Edited copy of mysql.h using vi by doing g/, *$/j (repeat) then g/\* *$/j (repeat)
357 # to get all functions on one line each.
358 # Extracted list of api func names from http://dev.mysql.com/doc/refman/4.1/en/c-api-functions.html
359 # and copied to a temporary file to clean up (mysql_api_names.txt)
360 # Stripped down to bare names and merged into one line separated by |
361 # then egrep -w `cat mysql_api_names.txt` mysql.h > mysql_api.ncidef
362 # then edit mysql_api.ncidef in vi: %s/^/ # /
363 # to create space for nci signatures and to use original definition as a # comment.
364 # This method isn't ideal, I'm just noting it here in case it helps others.
365 # Ideally the process should be automated - but there be many dragons along # that path.
367 # long long values (my_ulonglong) aren't handled by nci - spec'd as just long for now
369 # MYSQL_FIELD and MYSQL_RES are structs
370 # typedef char **MYSQL_ROW; /* return data as array of strings */
371 # typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
372 # typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
374 l p #! my_ulonglong mysql_num_rows(MYSQL_RES *res)
375 i p # unsigned int mysql_num_fields(MYSQL_RES *res)
376 c p # my_bool mysql_eof(MYSQL_RES *res)
377 p pi # MYSQL_FIELD *mysql_fetch_field_direct(MYSQL_RES *res, unsigned int fieldnr)
378 p p # MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES *res)
379 p p # MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES *res)
380 i p # MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES *res)
381 i p # unsigned int mysql_field_count(MYSQL *mysql)
382 l p #! my_ulonglong mysql_affected_rows(MYSQL *mysql)
383 l p #! my_ulonglong mysql_insert_id(MYSQL *mysql)
384 i p # unsigned int mysql_errno(MYSQL *mysql)
385 t p # const char * mysql_error(MYSQL *mysql)
386 t p # const char * mysql_info(MYSQL *mysql)
387 l p # unsigned long mysql_thread_id(MYSQL *mysql)
388 t p # const char * mysql_character_set_name(MYSQL *mysql)
389 p p # MYSQL * mysql_init(MYSQL *mysql)
390 i pttttt # int mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca, const char *capath, const char *cipher)
391 c pttt # my_bool mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db)
392 p pttttiti # MYSQL * mysql_real_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned int clientflag)
393 v p # void mysql_close(MYSQL *sock)
394 i pt # int mysql_select_db(MYSQL *mysql, const char *db)
395 i pt # int mysql_query(MYSQL *mysql, const char *q)
396 i ptl # int mysql_real_query(MYSQL *mysql, const char *q, unsigned long length)
397 i p # int mysql_shutdown(MYSQL *mysql)
398 i p # int mysql_dump_debug_info(MYSQL *mysql)
399 i pi # int mysql_refresh(MYSQL *mysql, unsigned int refresh_options)
400 i pl # int mysql_kill(MYSQL *mysql,unsigned long pid)
401 i p # int mysql_ping(MYSQL *mysql)
402 t p # const char * mysql_stat(MYSQL *mysql)
403 t p # const char * mysql_get_server_info(MYSQL *mysql)
404 t p # const char * mysql_get_client_info(void)
405 l # unsigned long mysql_get_client_version(void)
406 t p # const char * mysql_get_host_info(MYSQL *mysql)
407 t p # unsigned int mysql_get_proto_info(MYSQL *mysql)
408 p pt # MYSQL_RES * mysql_list_dbs(MYSQL *mysql,const char *wild)
409 p pt # MYSQL_RES * mysql_list_tables(MYSQL *mysql,const char *wild)
410 p ptt # MYSQL_RES * mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
411 p p # MYSQL_RES * mysql_list_processes(MYSQL *mysql)
412 p p # MYSQL_RES * mysql_store_result(MYSQL *mysql)
413 p p # MYSQL_RES * mysql_use_result(MYSQL *mysql)
414 i pit # int mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)
415 v p # void mysql_free_result(MYSQL_RES *result)
416 v pl # void mysql_data_seek(MYSQL_RES *result, my_ulonglong offset)
417 p pp # MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET offset)
418 i pi # MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)
419 p p # MYSQL_ROW mysql_fetch_row(MYSQL_RES *result)
420 l p # unsigned long * mysql_fetch_lengths(MYSQL_RES *result)
421 p p # MYSQL_FIELD * mysql_fetch_field(MYSQL_RES *result)
422 l ttl # unsigned long mysql_escape_string(char *to,const char *from, unsigned long from_length)
423 l pttl # unsigned long mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, unsigned long length)
424 v t # void mysql_debug(const char *debug)
425 # --- end mysqlclient library ---
427 i # void function returning int like fork()
428 i i3i # POSIX's waitpid