[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Status of ctypes Subversion bindings

From: Eric Gillespie <epg_at_pretzelnet.org>
Date: Tue, 17 Jun 2008 20:25:46 -0700

Eric Gillespie <epg_at_pretzelnet.org> writes:

> I started testing csvn again, and found a problem.

One more, and then I'm done for now.

>>> revprops = csvn.core.apr_hash_make(pool)
>>> csvn.core.apr_hash_set(revprops, 'svn:log', csvn.core.APR_HASH_KEY_STRING, csvn.core.svn_string_create('log message', pool))
>>> val = csvn.core.apr_hash_get(revprops, 'key', csvn.core.APR_HASH_KEY_STRING)
>>> val
<ctypes.LP_c_void object at 0xf7aae6a4>
>>> val_s = ctypes.cast(val, csvn.core.svn_string_t)

Process Python segmentation fault (core dumped)

OK, so I probably did something wrong. Maybe I can get
csvn.types.Hash to work, and then I can pare that down until I
understand what to do with a hash.

>>> revprops = csvn.types.Hash(csvn.core.svn_string_t, wrapper=csvn.types.SvnStringPtr)
>>> revprops
{}
>>> revprops['svn:log'] = 'log message'
>>> revprops['svn:log']

Process Python segmentation fault (core dumped)

Well, maybe guessing from uses of Hash in the high-level binding
was wrong and I don't want the wrapper= parameter.

>>> revprops = csvn.types.Hash(csvn.core.svn_string_t)
>>> revprops['svn:log'] = 'log message'
>>> revprops['svn:log']
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/google/home/epg/work/svn/ctypes-python-bindings6/csvn/types.py", line 59, in __getitem__
    raise KeyError(key)
KeyError: 'svn:log'
>>> revprops

Process Python segmentation fault (core dumped)

Help? :)

-- 
Eric Gillespie <*> epg_at_pretzelnet.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-18 05:26:01 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.