I have tested the patches below now. Could someone have a look at them and see if they can get commited especially the patch to the call_list.txt file.

Harry

Harry Jackson wrote:
Some questions

Please note:
I have been unable to test these patches with "make test" due to the problems I mentioned in an earler post. I have managed to get the postgres lib working again and I am hoping this is the only thing I have affected with these patches although if someone would like to apply and try them I would appreciate it.



I am getting errors when trying to load the libpq library. I added a few
lines to the /parrot/build_tools/build_nativecall.pl script to see what was going on when I got the core dump. I have attached a patch to add these. There may be some problems with it. I was also thinking that it would be handy to have the facility to print out variables in the message, what do people think?



I noticed that there are several signatures missing from call_list.txt so I added these as well. Patch attached. There where quite a few which probably means I am barking up the wrong tree.


On side note: I was reading the docs on strings and noticed that we should always be using "STRING" but I have noticed a few references to "String" while rummaging around. From what I can gather they are one and the same and "String" is redundant. Is this the case?


On another side note I noticed a reference to "TWEAKS", purely by chance. For those not in the know

  From the summarizer:
TWEAKS
   (Takers Wanted -- Effort And Knowledge Sought).
   http://xrl.us/o2g

From what I can gather this is a list of tasks compiled by leo that need to be carried out and help is required. I think it would be a good idea to have a well kept todo list particularly for tasks that are fairly easy to complete. I am sure there are people on this list like myself who do not mind doing the smaller stuff (including documention ;-) in order to get to know the guts. Although some of the stuff leo is asking for is not that small.


On another side note I noticed the string.pod documentations asks at the bottom "Should the following functions be mentioned? string_append, string_from_cstring, string_from_int, string_from_num, string_index, string_replace, string_set, string_str_index, string_to_cstring, string_to_int, string_to_num, string_transcode."

Yes they should, it is things like this that would be good to
put on the TWEAKS along with where or how to start[1]. The
strings doc has been one of the handiest I have found to date.

Harry (on a side note) Jackson


1. If anyone wants to take it on and is unsure where to start. Use the folowing file.


/parrot/include/parrot/string_funcs.h

file to see what each of the functions do and try some of them and document what you do in strings.pod and submit your results. I will probably make some entries on it myself if no one else does.


------------------------------------------------------------------------


--- build_nativecall.pl Tue Dec 30 15:54:20 2003
+++ build_nativecall.pl.new Tue Dec 30 15:53:09 2003
@@ -143,7 +143,6 @@
* Notes:
* References:
*/
-
#include "parrot/parrot.h"
#if defined(HAS_JIT) && defined(I386) && defined(threaded_NCI_is_ok)
@@ -207,8 +206,13 @@
to a function that can call it. */
void *
build_call_func(struct Parrot_Interp *interpreter, PMC *pmc_nci,
- String *signature)
+ STRING *signature)
{
+ + STRING *ns;
+ STRING *message;
+ char *c;
+
#if defined(CAN_BUILD_CALL_FRAMES)
/* This would be a good place to put the code that builds the
frames. Undoubtedly painfully platform-dependent */
@@ -221,7 +225,20 @@
UNUSED(pmc_nci);
if (0 == string_length(signature)) return F2DPTR(pcf_v_v);
$icky_global_bit
- PANIC("Unknown signature type");
+ + + /*
+ These three lines have been added to aid debugging. I want to be able to
+ see which signature has an unknown type. I am sure someone can come up
+ with a neater way to do this.
+ */
+ ns = string_make(interpreter, " is an unknown signature type", 30, NULL, 0, NULL);
+ message = string_concat(interpreter, signature, ns, 0);
+ + // I think there may be memory issues with this but if we get to here we are
+ // aborting.
+ c = string_to_cstring(interpreter, message);
+ PANIC(c);
return NULL;
#endif
}





------------------------------------------------------------------------


--- call_list.txt Tue Dec 30 15:54:20 2003
+++ call_list.txt.new Tue Dec 30 15:53:34 2003
@@ -181,6 +181,18 @@
# Oddball ones for postgres
p ptiLTLLi
+p t
+p ttttttt
+c p
+t p
+v pp
+t tl4
+t t4
+p pt
+p pi33ipi
+t pii
+p pi
+i pitl
# The following are used by library/pcre.imc
p tiB3P






Reply via email to