File tree 2 files changed +12
-12
lines changed 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -324,11 +324,11 @@ pub(crate) fn impl_define_exception(
324
324
#[ pyexception( #class_name, #base_class) ]
325
325
#[ derive( Debug ) ]
326
326
#[ doc = #docs]
327
- struct #class_name { }
327
+ pub struct #class_name { }
328
328
329
329
// We need this to make extend mechanism work:
330
- impl PyValue for #class_name {
331
- fn class( vm: & VirtualMachine ) -> & PyTypeRef {
330
+ impl :: rustpython_vm :: PyValue for #class_name {
331
+ fn class( vm: & :: rustpython_vm :: VirtualMachine ) -> & :: rustpython_vm :: builtins :: PyTypeRef {
332
332
& vm. ctx. exceptions. #ctx_name
333
333
}
334
334
}
@@ -337,19 +337,19 @@ pub(crate) fn impl_define_exception(
337
337
impl #class_name {
338
338
#[ pyslot]
339
339
pub ( crate ) fn tp_new(
340
- cls: PyTypeRef ,
341
- args: FuncArgs ,
342
- vm: & VirtualMachine ,
343
- ) -> PyResult {
340
+ cls: :: rustpython_vm :: builtins :: PyTypeRef ,
341
+ args: :: rustpython_vm :: function :: FuncArgs ,
342
+ vm: & :: rustpython_vm :: VirtualMachine ,
343
+ ) -> :: rustpython_vm :: PyResult {
344
344
#tp_new_slot
345
345
}
346
346
347
347
#[ pymethod( magic) ]
348
348
pub ( crate ) fn init(
349
- zelf: PyRef <PyBaseException >,
350
- args: FuncArgs ,
351
- vm: & VirtualMachine ,
352
- ) -> PyResult <( ) > {
349
+ zelf: :: rustpython_vm :: PyRef <:: rustpython_vm :: exceptions :: PyBaseException >,
350
+ args: :: rustpython_vm :: function :: FuncArgs ,
351
+ vm: & :: rustpython_vm :: VirtualMachine ,
352
+ ) -> :: rustpython_vm :: PyResult <( ) > {
353
353
#init_method
354
354
}
355
355
}
Original file line number Diff line number Diff line change @@ -530,7 +530,7 @@ fn func_sig(sig: &Signature) -> String {
530
530
if ty == "FuncArgs" {
531
531
return Some ( "*args, **kwargs" . to_owned ( ) ) ;
532
532
}
533
- if ty == "& VirtualMachine" {
533
+ if ty. starts_with ( '&' ) && ty . ends_with ( " VirtualMachine") {
534
534
return None ;
535
535
}
536
536
let ident = match arg. pat . as_ref ( ) {
You can’t perform that action at this time.
0 commit comments