From 08f3b56f9be1e85d9c88746f9b45f93078cfd679 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 2 Aug 2007 23:18:46 +0000 Subject: [PATCH] calling the callback functions directly added to the example git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9882 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/python/funcptr2/runme.py | 4 ++++ Examples/ruby/funcptr2/runme.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Examples/python/funcptr2/runme.py b/Examples/python/funcptr2/runme.py index bce065057..bd58fb620 100644 --- a/Examples/python/funcptr2/runme.py +++ b/Examples/python/funcptr2/runme.py @@ -18,3 +18,7 @@ print "Here is what the C callback function objects look like in Python" print " ADD =", example.ADD print " SUB =", example.SUB print " MUL =", example.MUL + +print "Call the functions directly..." +print " add(a,b) =", example.add(a,b) +print " sub(a,b) =", example.sub(a,b) diff --git a/Examples/ruby/funcptr2/runme.rb b/Examples/ruby/funcptr2/runme.rb index 9a2f65166..99b984260 100644 --- a/Examples/ruby/funcptr2/runme.rb +++ b/Examples/ruby/funcptr2/runme.rb @@ -16,3 +16,7 @@ puts "Here is what the C callback function objects look like in Ruby" puts " ADD = #{Example::ADD}" puts " SUB = #{Example::SUB}" puts " MUL = #{Example::MUL}" + +puts "Call the functions directly..." +puts " add(a,b) = #{Example.add(a,b)}" +puts " sub(a,b) = #{Example.sub(a,b)}"