While code seems to still compile, this was initially done
to explicitly get rid of potential borrows and doesn't seem
to be necessary anymore?
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
when using the export macro directly without a package we
previously always used
#[no_mangle]
pub extern "C"
now instead of 'pub' we copy the original function's
visibility
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
commi 5491907876 was incomplete, this fixes up the
remaining 2 cases
Fixes: 5491907876 ("don't export xs wrappers from modules")
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
if we ever want to support mgvtbl methods we may need to add
support for detecting the pTHX_ parameter into our build.rs
scripts
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
These are now *list* return types in perl.
However, currently there is no support for 'wantarray' or
lists of dynamic length.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Allow deserializing things such as `&[u8]` to reference the
original data instead of requiring a `Vec<u8>` instead.
Introduces `perlmod::from_ref_value` next to
`perlmod::from_value` with a new signature.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The `make_package` macro is tedious to use. We now simply
depend on new-enough rustc for `package` to work.
The change to #[export] allows writing:
#[export(name = "DESTROY")]
fn destroy(#[raw] this: Value) { ... }
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
A function declared with a raw_return attribute like this:
#[export(raw_return)]
fn foo() -> Result<Value, Error>;
will not perform serialization on the 'Value', but return
the "raw" value to perl. This allows returning blessed
values.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>