Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .regenerate_python_bindings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from subprocess import check_output, check_call, DEVNULL
import os
import sys
from platform import dist
import distro
from sys import stdout
from threading import Timer, Event
import itertools, sys
Expand All @@ -20,9 +20,9 @@ def thought():


def linux_version():
distro, version, _ = dist()
maj_version = version.split(".")[0]
return distro, maj_version
linux_distro = distro.name()
maj_version = distro.major_version()
return linux_distro, maj_version


def swig_version():
Expand Down
2 changes: 1 addition & 1 deletion modules/c/nitf/source/NitfReader.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ NITFAPI(void) nitf_Reader_destruct(nitf_Reader** reader)
{
/* If the reader has already been destructed, or was never */
/* Inited, dont dump core */
if (*reader)
if (reader && *reader)
{
nitf_ListIterator iter;
nitf_ListIterator end;
Expand Down
22 changes: 11 additions & 11 deletions modules/python/nitf/source/nitro.i
Original file line number Diff line number Diff line change
Expand Up @@ -65,93 +65,93 @@
* Setup some typemaps for the destructors
*/
%typemap(in) nitf_DataSource**{
nitf_DataSource* temp = 0;
if ($input)
{
nitf_DataSource* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp, $descriptor(nitf_DataSource *), 0 | 0 ) != -1 && temp)
$1 = (nitf_DataSource**)&temp;
}
}

%typemap(in) nitf_Writer**{
nitf_Writer* temp = 0;
if ($input)
{
nitf_Writer* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_Writer*), 0 | 0 ) != -1 && temp)
$1 = (nitf_Writer**)&temp;
}
}
%typemap(in) nitf_ImageWriter**{
nitf_ImageWriter* temp = 0;
if ($input)
{
nitf_ImageWriter* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_ImageWriter*), 0 | 0 ) != -1 && temp)
$1 = (nitf_ImageWriter**)&temp;
}
}
%typemap(in) nitf_ImageSource**{
nitf_ImageSource* temp = 0;
if ($input)
{
nitf_ImageSource* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_ImageSource*), 0 | 0 ) != -1 && temp)
$1 = (nitf_ImageSource**)&temp;
}
}
%typemap(in) nitf_ImageReader**{
nitf_ImageReader* temp = 0;
if ($input)
{
nitf_ImageReader* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_ImageReader*), 0 | 0 ) != -1 && temp)
$1 = (nitf_ImageReader**)&temp;
}
}
%typemap(in) nitf_Reader**{
nitf_Reader* temp = 0;
if ($input)
{
nitf_Reader* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_Reader*), 0 | 0 ) != -1 && temp)
$1 = (nitf_Reader**)&temp;
}
}
%typemap(in) nitf_DownSampler**{
nitf_DownSampler* temp = 0;
if ($input)
{
nitf_DownSampler* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_DownSampler*), 0 | 0 ) != -1 && temp)
$1 = (nitf_DownSampler**)&temp;
}
}
%typemap(in) nitf_Record**{
nitf_Record* temp = 0;
if ($input)
{
nitf_Record* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_Record*), 0 | 0 ) != -1 && temp)
$1 = (nitf_Record**)&temp;
}
}

%typemap(in) nitf_TREEnumerator**{
nitf_TREEnumerator* temp = 0;
if ($input)
{
nitf_TREEnumerator* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_TREEnumerator*), 0 | 0 ) != -1 && temp)
$1 = (nitf_TREEnumerator**)&temp;
}
}

%typemap(in) nitf_SegmentReader**{
nitf_SegmentReader* temp = 0;
if ($input)
{
nitf_SegmentReader* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_SegmentReader*), 0 | 0 ) != -1 && temp)
$1 = (nitf_SegmentReader**)&temp;
}
}

%typemap(in) nitf_SegmentSource**{
nitf_SegmentSource* temp = 0;
if ($input)
{
nitf_SegmentSource* temp = 0;
if (SWIG_ConvertPtr($input, (void**)&temp,$descriptor(nitf_SegmentSource*), 0 | 0 ) != -1 && temp)
$1 = (nitf_SegmentSource**)&temp;
}
Expand Down