[tahoe-lafs-trac-stream] [Tahoe-LAFS] #1432: Magic Folder on Mac OS X and other BSDs
Tahoe-LAFS
trac at tahoe-lafs.org
Thu Apr 14 14:24:33 UTC 2016
#1432: Magic Folder on Mac OS X and other BSDs
-------------------------------------+-------------------------------------
Reporter: davidsarah | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: undecided
Component: code-frontend- | Version: 1.8.2
magic-folder | Keywords: fsevents mac bsd magic-
Resolution: | folder
Launchpad Bug: |
-------------------------------------+-------------------------------------
Comment (by dawuud):
Currently I have a failed attempt at creating this CFArray of CFString`s;
running it results in a segmentation fault... however the VM i'm using
won't write a core file. What to do?
{{{
(virtenv-objc) xcloud114:~ Xcloud$ python test.py
Segmentation fault: 11
}}}
{{{
#!/usr/bin/env python
import ctypes
from ctypes import POINTER, byref, create_string_buffer, addressof
from ctypes import cdll, c_void_p
from ctypes.util import find_library
# kCFStringEncodingUTF8
UTF8 = 134217984
# kCFAllocatorDefault
CF_DEFAULT_ALLOCATOR = None
core_services = cdll.LoadLibrary(find_library('CoreServices'))
core_foundation = cdll.LoadLibrary(find_library('CoreFoundation'))
def PyStringToCFString(pystring):
return core_foundation.CFStringCreateWithCString(CF_DEFAULT_ALLOCATOR,
pystring.encode('utf8'),
UTF8)
my_cfarray = core_foundation.CFArrayCreate(None, None, 0,
ctypes.c_int.in_dll(core_services, "kCFTypeArrayCallBacks"))
my_cfstr = PyStringToCFString("/Users/Xcloud/magic-folder")
core_foundation.CFArrayAppendValue(my_cfarray, my_cfstr)
}}}
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1432#comment:19>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list