2015-08-12 09:30:47 +00:00
|
|
|
# Copyright 2015 The go-python Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style
|
|
|
|
# license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
## py2/py3 compat
|
|
|
|
from __future__ import print_function
|
|
|
|
|
|
|
|
import pointers
|
|
|
|
|
|
|
|
print("s = pointers.S(2)")
|
2019-03-06 10:41:03 +00:00
|
|
|
s = pointers.S(Value=2)
|
2015-08-12 09:30:47 +00:00
|
|
|
print("s = %s" % (s,))
|
|
|
|
print("s.Value = %s" % (s.Value,))
|
|
|
|
|
2019-03-06 10:41:03 +00:00
|
|
|
# note: pointers to basic types (int) not supported - would
|
|
|
|
# require a handle -- could to, but probably not worth it..
|
|
|
|
#print("pointers.Inc(s)")
|
|
|
|
#print("s.Value = %s" % (s.Value,))
|
2019-01-16 13:47:57 +00:00
|
|
|
|
|
|
|
print("OK")
|