Fix up the SWIG wrapper for GncOptionDBPtr.

Thanks to Flexo@stackoverflow for
https://stackoverflow.com/questions/27693812/how-to-handle-unique-ptrs-with-swig
5 years later, why isn't this in SWIG yet?
This commit is contained in:
John Ralls
2019-09-29 12:12:32 -07:00
parent 4146251cc7
commit 0a13b4c518
2 changed files with 39 additions and 3 deletions

View File

@@ -37,10 +37,9 @@
(define (test-gnc-make-text-option)
(test-begin "test-gnc-test-string-option")
(let* ((option-db (new-GncOptionDB))
(let* ((option-db (gnc-option-db-new))
(string-opt (gnc-register-string-option option-db "foo" "bar" "baz"
"Phony Option" "waldo")))
(test-equal (GncOptionDB-lookup-option option-db "foo" "bar") "waldo")
(delete-GncOptionDB option-db))
(test-equal (GncOptionDB-lookup-option (GncOptionDBPtr-get option-db) "foo" "bar") "waldo"))
(test-end "test-gnc-make-string-option"))