Created
April 18, 2018 09:36
-
-
Save tmarplatt/29c7025e42784c2c539d45bfcfaac5c7 to your computer and use it in GitHub Desktop.
pyd GC test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dTests | |
from kivy.uix.widget import Widget | |
class testClass(Widget): | |
one = [1, 2, 3, 4, 5, 6] | |
widgetlist = [] | |
for x in range(100000): | |
a = testClass() | |
widgetlist += [ a ] | |
for x in range(100000): | |
dTests.iterateOverWidgets(widgetlist) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyd.support import setup, Extension | |
projectName = 'dTests' | |
compileArgs = ['-w'] | |
setup( | |
name=projectName, | |
version='0.0.1', | |
ext_modules=[ | |
Extension(projectName, ['tests.d'], | |
extra_compile_args=compileArgs, | |
build_deimos=True, | |
d_lump=True | |
) | |
], | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module dTests; | |
import pyd.pyd; | |
struct testPO { | |
PydObject po; | |
} | |
void iterateOverWidgets(PydObject a) { | |
testPO current; | |
foreach (widget; a) { | |
current = testPO(widget); | |
} | |
} | |
extern(C) void PydMain() { | |
def!(iterateOverWidgets)(); | |
module_init(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment