[GRASS-dev] [GRASS GIS] #2729: Missing Vect_new_map_struct

#2729: Missing Vect_new_map_struct
-------------------------+-------------------------
Reporter: rblazek | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Vector | Version: svn-trunk
Keywords: | CPU: Unspecified
Platform: All |
-------------------------+-------------------------
There is no function to allocate Map_info. If GRASS library is used in
another application (QGIS for example) which is compiled by a compiller
with different ABI, calls to Vect_ functions using Map_info structure
allocated by the other application may result in crash. The problem was
discussed here:
http://lists.osgeo.org/pipermail/grass-dev/2015-June/075539.html

A patch against trunk r66029 introducing Vect_new_map_struct and
Vect_destroy_map_struct is attached. I am not sure what should be a policy
for releasing Map_info members.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2729&gt;
GRASS GIS <https://grass.osgeo.org>

#2729: Missing Vect_new_map_struct
--------------------------+-------------------------
  Reporter: rblazek | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone:
Component: Vector | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: All
--------------------------+-------------------------
Changes (by rblazek):

* Attachment "Vect_new_map_struct.patch" added.

Patch for r66029 introducing Vect_new_map_struct and
Vect_destroy_map_struct

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2729&gt;
GRASS GIS <https://grass.osgeo.org>

#2729: Missing Vect_new_map_struct
--------------------------+-------------------------
  Reporter: rblazek | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.1
Component: Vector | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: All
--------------------------+-------------------------
Changes (by neteler):

* milestone: => 7.0.1

Comment:

Should G_malloc() be used instead of malloc()?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2729#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#2729: Missing Vect_new_map_struct
--------------------------+-------------------------
  Reporter: rblazek | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.1.0
Component: Vector | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: All
--------------------------+-------------------------
Changes (by huhabla):

* milestone: 7.0.1 => 7.1.0

Comment:

Patch applied in r66048. I did not modified the patch to use G_malloc(),
since the error message would be generic then. However, if this is not of
importance, then we should use G_malloc() and remove the function specific
G_fatal_error() call.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2729#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#2729: Missing Vect_new_map_struct
--------------------------+-------------------------
  Reporter: rblazek | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.4.0
Component: Vector | Version: svn-trunk
Resolution: fixed | Keywords:
       CPU: Unspecified | Platform: All
--------------------------+-------------------------
Changes (by martinl):

* status: new => closed
* resolution: => fixed
* milestone: 7.4.1 => 7.4.0

Comment:

Seems to be already solved.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2729#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>