I am building a module which connects to a camera, takes a picture, and reads the data into a piddle. All of this takes place in an Inline::C command. Using the procedure in the PDL documentation I can create a pdl * and return it. However the camera could fail to take a picture in which case I would like to return 0 as per the usual covention my $pic_pdl = $Camera->TakePicture or die "Failed to take image". This seems to mean that I will need to use the Inline_Stack_Push mechanism but I am not sure how to properly convert the pdl * into an SV*. Also I would like to, if possible, set $! with the error code too. Can this be done in Inline?
Perl Inline::C return pdl or 0 on failure
298 Views Asked by Joel Berger At
1
There are 1 best solutions below
Related Questions in PERL
- Upload a document to a SharePoint document library (can be via Rest Api/other) using C# & also retrieve the unique id of the document
- Sharepoint alers email deletion from alerts
- Apache Reverse Proxy erases <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- Can REST-like URLs be passed/recognized in sharepoint 2010?
- Configure SharePoint 2010 UPS with PowerShell
- How to dynamically create Sharepoint ComboBoxes?
- SharePoint 2013 Custom list field iterator not saving values for MultiLine or person columns
- Publicly available InfoPath form connecting to Access db in a restricted location
- Why does my Sharepoint WebPart deploy (nominally), but is still not available for adding to a page/form?
- Does CAML Query has a default RowLimit value?
Related Questions in RETURN-TYPE
- Upload a document to a SharePoint document library (can be via Rest Api/other) using C# & also retrieve the unique id of the document
- Sharepoint alers email deletion from alerts
- Apache Reverse Proxy erases <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- Can REST-like URLs be passed/recognized in sharepoint 2010?
- Configure SharePoint 2010 UPS with PowerShell
- How to dynamically create Sharepoint ComboBoxes?
- SharePoint 2013 Custom list field iterator not saving values for MultiLine or person columns
- Publicly available InfoPath form connecting to Access db in a restricted location
- Why does my Sharepoint WebPart deploy (nominally), but is still not available for adding to a page/form?
- Does CAML Query has a default RowLimit value?
Related Questions in PDL
- Upload a document to a SharePoint document library (can be via Rest Api/other) using C# & also retrieve the unique id of the document
- Sharepoint alers email deletion from alerts
- Apache Reverse Proxy erases <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- Can REST-like URLs be passed/recognized in sharepoint 2010?
- Configure SharePoint 2010 UPS with PowerShell
- How to dynamically create Sharepoint ComboBoxes?
- SharePoint 2013 Custom list field iterator not saving values for MultiLine or person columns
- Publicly available InfoPath form connecting to Access db in a restricted location
- Why does my Sharepoint WebPart deploy (nominally), but is still not available for adding to a page/form?
- Does CAML Query has a default RowLimit value?
Related Questions in INLINE-C
- Upload a document to a SharePoint document library (can be via Rest Api/other) using C# & also retrieve the unique id of the document
- Sharepoint alers email deletion from alerts
- Apache Reverse Proxy erases <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- Can REST-like URLs be passed/recognized in sharepoint 2010?
- Configure SharePoint 2010 UPS with PowerShell
- How to dynamically create Sharepoint ComboBoxes?
- SharePoint 2013 Custom list field iterator not saving values for MultiLine or person columns
- Publicly available InfoPath form connecting to Access db in a restricted location
- Why does my Sharepoint WebPart deploy (nominally), but is still not available for adding to a page/form?
- Does CAML Query has a default RowLimit value?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The
pdl*is converted to an SV by code found in the typemap.If I read that right, you should be able to do something like:
As for
$!, it's simply an interface to C'serrno. Simply seterrno.