Merge lp:~illume/pgs4a/fixes into lp:pgs4a

Proposed by illume
Status: Needs review
Proposed branch: lp:~illume/pgs4a/fixes
Merge into: lp:pgs4a
Diff against target: 60 lines (+16/-5)
2 files modified
jni/application/python/start.pyx (+6/-1)
runtimelib/android_sound.pyx (+10/-4)
To merge this branch: bzr merge lp:~illume/pgs4a/fixes
Reviewer Review Type Date Requested Status
Pygame Subset for Android Pending
Review via email: mp+53152@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tom Rothamel (renpytom) wrote :

Could you try the Ubuntu version of cython? It seems to support three-argument getattr.

Unmerged revisions

100. By illume

Version of pyrex on ubuntu does not support 3 arg gettattr. Made 3rd arg work.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'jni/application/python/start.pyx'
--- jni/application/python/start.pyx 2011-02-21 21:40:39 +0000
+++ jni/application/python/start.pyx 2011-03-12 22:33:06 +0000
@@ -8,6 +8,11 @@
8cdef extern initandroid()8cdef extern initandroid()
9 9
10import sys10import sys
11def _getattr(o, attr, default):
12 try:
13 return getattr(o, attr)
14 except AttributeError:
15 return default
1116
12class LogFile(object):17class LogFile(object):
13 def __init__(self):18 def __init__(self):
@@ -52,7 +57,7 @@
5257
53 import main58 import main
5459
55 if getattr(main, "main", None):60 if _getattr(main, "main", None):
56 main.main()61 main.main()
5762
58except:63except:
5964
=== modified file 'runtimelib/android_sound.pyx'
--- runtimelib/android_sound.pyx 2011-02-19 17:09:14 +0000
+++ runtimelib/android_sound.pyx 2011-03-12 22:33:06 +0000
@@ -15,13 +15,19 @@
15channels = set()15channels = set()
16volumes = { }16volumes = { }
1717
18def _getattr(o, attr, default):
19 try:
20 return getattr(o, attr)
21 except AttributeError:
22 return default
23
18def queue(channel, file, name, fadein=0, tight=False):24def queue(channel, file, name, fadein=0, tight=False):
1925
20 channels.add(channel)26 channels.add(channel)
21 27
22 real_fn = file.name 28 real_fn = file.name
23 base = getattr(file, "base", -1)29 base = _getattr(file, "base", -1)
24 length = getattr(file, "length", -1)30 length = _getattr(file, "length", -1)
2531
26 android_sound_queue(channel, name, real_fn, base, length)32 android_sound_queue(channel, name, real_fn, base, length)
2733
@@ -30,8 +36,8 @@
30 channels.add(channel)36 channels.add(channel)
31 37
32 real_fn = file.name 38 real_fn = file.name
33 base = getattr(file, "base", -1)39 base = _getattr(file, "base", -1)
34 length = getattr(file, "length", -1)40 length = _getattr(file, "length", -1)
3541
36 android_sound_play(channel, name, real_fn, base, length)42 android_sound_play(channel, name, real_fn, base, length)
3743

Subscribers

People subscribed via source and target branches

to status/vote changes: