I have been reviewing this Segmentation fault you get, and looking at
the implementation of the api for python it does make sense to get this
error, the problem here is that calling the function
zorba_api.ItemFactory() creates an item of the ItemFactory class with no
actual initialization so when trying to access functions of this class
it breaks with a segmentation error sinc ethe functions does not exist
for an ItemFactory started that way.

A way to get acces to the itemFactory functions so it doesn't break is:

>>> import zorba_api
>>> store = zorba_api.InMemoryStore_getInstance()
>>> zorba = zorba_api.Zorba_getInstance(store)
>>> content_item = zorba.getItemFactory()
>>> content_item.createInteger(4)

You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.

  Segmentation fault while using Item or ItemFactory class in python

Status in Zorba - The XQuery Processor:

Bug description:
  Here's the code to reproduce errors:

  >>> import zorba_api
  >>> item = zorba_api.ItemFactory()
  >>> content_item.createInteger(4)
  Segmentation fault

  Zorba Version: 2.1.0

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to