From: Colin P. A. <co...@co...> - 2007-12-24 16:37:49
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes: Eric> Colin Paul Adams wrote: >> When running under the gdb I get: >> >> Call on Void target! [Switching to Thread -1208531248 (LWP >> 755)] >> >> Breakpoint 1, GE_raise (code=1) at >> gestalt_test_driver48.c:24535 24535 GE_rescue* r = >> GE_last_rescue; (gdb) >> >> (gdb) backtrace #0 GE_raise (code=1) at >> gestalt_test_driver48.c:24535 #1 0x09afbe26 in GE_check_void >> (obj=0x0) at gestalt_test_driver48.c:24608 #2 0x08bc2571 in >> T1480f305 (ac=0xbfc2dfcc, C=0xb817540, a1=0xb447cb0) at >> gestalt_test_driver20.c:27100 Eric> This does not make sense to me. The C function T1480f305 Eric> corresponds to XM_XPATH_IDREF.create_node_iterator, which Eric> looks like that: Eric> create_node_iterator (a_context: XM_XPATH_CONTEXT) is Eric> -- Create an iterator over a node sequence do todo Eric> ("create_node_iterator", False) end Eric> I don't see how there could be a call-on-void-target in that Eric> routine, there is no qualified call! Ah. There is as of yesterday (I went through all the remaining todos, and eliminated all those that were not for a possible future schema-aware version of XSLT)! Here is the newer routine: create_node_iterator (a_context: XM_XPATH_CONTEXT) is -- Create iterator over nodes of a sequence. local l_idrefs: DS_ARRAYED_LIST [STRING] l_node: XM_XPATH_NODE l_splitter: ST_SPLITTER l_iterator: XM_XPATH_SEQUENCE_ITERATOR [XM_XPATH_NODE] l_result: DS_CELL [XM_XPATH_ITEM] do last_node_iterator := Void create l_result.make (Void) arguments.item (2).evaluate_item (l_result, a_context) if l_result.item.is_error then create {XM_XPATH_INVALID_NODE_ITERATOR} last_node_iterator.make (l_result.item.error_value) else check node: l_result.item.is_node -- `required_type' will have ensured this end l_node := l_result.item.as_node.root if l_node.is_document then arguments.item (1).create_node_iterator (a_context) if arguments.item (1).last_node_iterator.is_error then last_node_iterator := arguments.item (1).last_node_iterator else create l_idrefs.make_default l_idrefs.set_equality_tester (string_equality_tester) l_iterator := arguments.item (1).last_node_iterator from l_iterator.start until l_iterator.is_error or else l_iterator.after loop create l_splitter.make l_idrefs.append_last (l_splitter.split (l_iterator.item.string_value)) l_iterator.forth end if l_iterator.is_error then last_node_iterator := l_iterator else last_node_iterator := l_node.as_document.idrefs_nodes (l_idrefs) end end else create {XM_XPATH_INVALID_NODE_ITERATOR} last_node_iterator.make_from_string ("In the idref() function," + " the tree being searched must be one whose root is a document node", Xpath_errors_uri, "FODC0001", Dynamic_error) end end end In the line: if l_result.item.is_error then l_result.item should be guarenteed non-Void due to XPath static typing. I'll run the gobo test cases, and if they all pass, I'll check in my changes. -- Colin Adams Preston Lancashire |