Skip to content
This repository
Browse code

add export tags

  • Loading branch information...
commit 3228da6deef132df61500fb1382a99c14595786d 1 parent bc26b5e
Moritz Lenz authored August 21, 2012

Showing 1 changed file with 10 additions and 9 deletions. Show diff stats Hide diff stats

  1. 19  lib/NativeCall.pm6
19  lib/NativeCall.pm6
@@ -139,10 +139,10 @@ my role NativeCallEncoded[$name] {
139 139
 }
140 140
 
141 141
 # Expose an OpaquePointer class for working with raw pointers.
142  
-my class OpaquePointer is export is repr('CPointer') { }
  142
+my class OpaquePointer is export(:types, :DEFAULT) is repr('CPointer') { }
143 143
 
144 144
 # CArray class, used to represent C arrays.
145  
-my class CArray is export is repr('CArray') {
  145
+my class CArray is export(:types, :DEFAULT) is repr('CArray') {
146 146
     method at_pos(CArray:D: $pos) { die "CArray cannot be used without a type" }
147 147
     
148 148
     my role IntTypedCArray[::TValue] does Positional[TValue] {
@@ -226,26 +226,26 @@ my class CArray is export is repr('CArray') {
226 226
     }
227 227
 }
228 228
 
229  
-multi trait_mod:<is>(Routine $r, :$symbol!) is export {
  229
+multi trait_mod:<is>(Routine $r, :$symbol!) is export(:DEFAULT, :traits) {
230 230
     $r does NativeCallSymbol[$symbol];
231 231
 }
232 232
 
233 233
 # Specifies that the routine is actually a native call, into the
234 234
 # current executable (platform specific) or into a named library
235  
-multi trait_mod:<is>(Routine $r, :$native!) is export {
  235
+multi trait_mod:<is>(Routine $r, :$native!) is export(:DEFAULT, :traits) {
236 236
     $r does Native[$r, $native === True ?? Str !! $native];
237 237
 }
238 238
 
239 239
 # Specifies the calling convention to use for a native call.
240  
-multi trait_mod:<is>(Routine $r, :$nativeconv!) is export {
  240
+multi trait_mod:<is>(Routine $r, :$nativeconv!) is export(:DEFAULT, :traits) {
241 241
     $r does NativeCallingConvention[$nativeconv];
242 242
 }
243 243
 
244 244
 # Ways to specify how to marshall strings.
245  
-multi trait_mod:<is>(Parameter $p, :$encoded!) is export {
  245
+multi trait_mod:<is>(Parameter $p, :$encoded!) is export(:DEFAULT, :traits) {
246 246
     $p does NativeCallEncoded[$encoded];
247 247
 }
248  
-multi trait_mod:<is>(Routine $p, :$encoded!) is export {
  248
+multi trait_mod:<is>(Routine $p, :$encoded!) is export(:DEFAULT, :traits) {
249 249
     $p does NativeCallEncoded[$encoded];
250 250
 }
251 251
 
@@ -264,12 +264,13 @@ role ExplicitlyManagedString {
264 264
     has CStr $.cstr is rw;
265 265
 }
266 266
 
267  
-multi explicitly-manage(Str $x is rw, :$encoding = 'utf8') is export {
  267
+multi explicitly-manage(Str $x is rw, :$encoding = 'utf8') is export(:DEFAULT,
  268
+:utils) {
268 269
     $x does ExplicitlyManagedString;
269 270
     $x.cstr = pir::repr_box_str__PsP(nqp::unbox_s($x), CStr[$encoding]);
270 271
 }
271 272
 
272  
-multi refresh($obj) is export {
  273
+multi refresh($obj) is export(:DEFAULT, :utils) {
273 274
     nqp::nativecallrefresh($obj);
274 275
     1;
275 276
 }

0 notes on commit 3228da6

Please sign in to comment.
Something went wrong with that request. Please try again.