Skip to content

Commit 222557a

Browse files
Add method for define mappings for python types.
1 parent 0a6c4d4 commit 222557a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/PythonBridge/PBApplication.class.st

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ PBApplication class >> uniqueInstance: anObject [
117117
uniqueInstance := anObject
118118
]
119119

120+
{ #category : #utils }
121+
PBApplication >> addMapping: pythonType to: pythonFunction [
122+
self commandFactory
123+
send: (#bridge_globals asP3GI => #msg_service => #addMapping
124+
callWith: (Array with: pythonType with: pythonFunction))
125+
]
126+
120127
{ #category : #accessing }
121128
PBApplication >> commandFactory [
122129
^ PBCF

0 commit comments

Comments
 (0)