[q-lang-users] Memory management in libqint
Brought to you by:
agraef
From: John C. <co...@cc...> - 2006-06-11 22:34:43
|
The comments in qint.h saying which arguments and results belong to Q (that is, the calling application must not free them) and which must be freed by the application are incomplete. For qexprs, I can control Q's behavior by using the qnewref, qfreeref, and qdispose functions, but for other argument types I need more details. Here's what I've gleaned so far: qstrerror: result string belongs to Q qexec* family: no information given, either about the string arguments or the vector of strings passed to qexecv and qexecvx qeval: no information given for string passed, but the result string must be freed by the application qparse: no information given for string passed qprint: the result string must be freed by the application qdef: no information given for string passed qget* family: argument string belongs to Q qmkmpz: mpz_t argument belongs to Q qmkstr: string argument belongs to Q qmkobj: object argument belongs to Q qmklistv: array of qexprs belongs to Q qmktuplev: array of qexprs belongs to Q qismpz: mpz_t object returned by reference belongs to Q qisstr: string returned by reference belongs to Q qisobj: object returned by reference belongs to Q qistuple: array of qexprs returned by reference belongs to Q Unicode helpers: no information I need to know these things in order to correctly program Scheme finalizers. Please clarify and correct them. Thanks. -- The Unicode Standard does not encode John Cowan idiosyncratic, personal, novel, or private http://www.ccil.org/~cowan use characters, nor does it encode logos or graphics. co...@cc... |