update all indirect references to native strings
[nit.git] / lib / mongodb / mongodb.nit
index 80c4d4c..06b469e 100644 (file)
@@ -42,6 +42,7 @@
 # ~~~
 module mongodb
 
+import json::static
 import json
 private import native_mongodb
 
@@ -90,9 +91,9 @@ private class BSON
        end
 
        redef fun to_s do
-               var ns = native.to_native_string
+               var ns = native.to_c_string
                var res = ns.to_s_with_copy
-               ns.free # manual free of gc allocated NativeString
+               ns.free # manual free of gc allocated CString
                return res
        end