implemented padding inside JobStatus
authorAleš Křenek <ljocha@ics.muni.cz>
Mon, 30 Jul 2007 17:26:10 +0000 (17:26 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Mon, 30 Jul 2007 17:26:10 +0000 (17:26 +0000)
org.glite.lb.client-interface/interface/jobstat.h.T

index 60ca35a..6115cdb 100644 (file)
@@ -89,9 +89,30 @@ typedef struct _edg_wll_TagValue {
  * Description of the job status.
  * Returned by the edg_wll_JobStatus() function
  */
+
+@@@{
+       my      $padno = 0;
+       my      $padstruct = 'edg_wll_JobStatCode state;';      # XXX
+
+       for my $n (getAllFieldsOrdered $status) {
+               selectField $status $n;
+               my $f = getField $status;
+               my $type = getType $f;
+               my $name = getName $f;
+
+               $padstruct .= "$type $name; ";
+               if ($f->{pad}) {
+                       gen "struct _pad_JobStatus_${padno}_dont_use { $padstruct };\n";
+                       $padno++;
+                       $padstruct = '';
+               }
+       }
+@@@}
+
 typedef struct _edg_wll_JobStat {
        edg_wll_JobStatCode     state;          /**< status code */
 @@@{
+       $padno = 0;
        for my $n (getAllFieldsOrdered $status) {
                selectField $status $n;
                my $f = getField $status;
@@ -103,6 +124,11 @@ typedef struct _edg_wll_JobStat {
                gen qq{
 !      $type   $name;  /**< $comment */
 };
+               if ($f->{pad}) {
+                       my $pad = $f->{pad};
+                       gen "\n char    _pad_${padno}[sizeof(void *) * $pad - sizeof(stuct _pad_JobStatus_${padno}_dont_use)];\n\n";
+                       $padno++;
+               }
        }
 @@@}