add %naturalvar to std::string and remove local li_std_string.i, so Mattias can finish the examples here :)

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8635 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-30 19:25:51 +00:00
commit dc9641de4b
2 changed files with 6 additions and 5 deletions

View file

@ -26,12 +26,11 @@
(define struct (make <Structure>))
;; MemberString should be a wrapped class
(define scl (slot-ref struct 'MemberString))
(if (not (string=? (slot-ref scl 'str) ""))
(if (not (string=? (slot-ref struct 'MemberString) ""))
(error "Error 4.5"))
(slot-set! scl 'str "and how")
(if (not (string=? (slot-ref (slot-ref struct 'MemberString) 'str) "and how"))
(error "Error 5"))
;(slot-set! (slot-ref struct 'MemberString) "and how")
;;(if (not (string=? (slot-ref struct 'MemberString) "and how"))
;; (error "Error 5"))
(if (not (string=? (slot-ref struct 'MemberString2) "member string 2"))
(error "Error 6"))
(Structure-StaticMemberString "static str")

View file

@ -6,6 +6,8 @@
%}
namespace std {
%naturalvar string;
%insert(closprefix) %{ (declare (hide <std-string>)) %}
%nodefault string;