Hi all!
i update sources from cvs today for make a new build of synchronet.
i have patched to have little support for sqlite database as javascript object [1] and need to update the code.
Compilation fails due to undefined reference to `JS_GetStringBytes'
i think that need to replace this funcion with according to the new sources
What should I use?
[1] http://bbs.docksud.com.ar/~ragnarok/sync/js_sqlite/
El 26/10/13 22:36, Ragnarok escribió:
switch(tiny) {
case SQLITE_PROP_STMT:
SAFECOPY(p->stmt, str); <==== SEGFAULT
stmt = JS_EncodeString(cx, JS_ValueToString(cx, *vp));
Compilation fails due to undefined reference to `JS_GetStringBytes'
i think that need to replace this funcion with according to the new sources What should I use?
Re: porting old patch
By: Ragnarok to DOVE-Net.Synchronet_Programming_C+ on Sat Oct 26 2013 10:36 pm
Compilation fails due to undefined reference to `JS_GetStringBytes'
i think that need to replace this funcion with according to the new sources
What should I use?
In sbbs.h, there are a number of macros defined...
JS_STRING_TO_RASTRING()
JSVALUE_TO_RASTRING()
Uses realloc()... the result must be free()d.
JSSTRING_TO_MSTRING()
JSVALUE_TO_MSTRING()
Uses malloc()... the result must be free()d.
JSSTRING_TO_STRBUF()
JSVALUE_TO_STRBUF()
Copies into the specified buffer.
JSSTRING_TO_ASTRING()
JSVALUE_TO_ASTRING()
Allocates the storage on the stack. Doesn't need to be free()d, but if you use
"too much" of the stack, Synchronet will crash.
---
http://DuckDuckGo.com/ a better search engine that respects your privacy.
� Synchronet � My Brand-New BBS (All the cool SysOps run STOCK!)
Sysop: | Ragnarok |
---|---|
Location: | Dock Sud, Bs As, Argentina |
Users: | 136 |
Nodes: | 10 (0 / 10) |
Uptime: | 12:31:38 |
Calls: | 15,171 |
Calls today: | 4 |
Files: | 19,857 |
D/L today: |
58 files (6,877K bytes) |
Messages: | 1,691,643 |