_gdk_win32_selection_convert_to_dib



Currently I'm building from gtk-2-24. I updated this morning and discovered that 'gdk/win32/gdkselection-win32.c' no longer builds with MSVC. The problem is in function '_gdk_win32_selection_convert_to_dib()' which is at approximately line 1280. The problem is caused by the recent addition of a macro (g_return_val_if_fail). Currently, the code looks like this:-

      HGLOBAL
      _gdk_win32_selection_convert_to_dib (HGLOBAL  hdata,
                           GdkAtom  target)
      {
        GDK_NOTE (DND, {
            gchar *target_name = gdk_atom_name (target);

            g_print ("_gdk_win32_selection_convert_to_dib: %p %s\n",
                 hdata, target_name);
            g_free (target_name);
          });

        if (target == _image_bmp)
          {
g_return_val_if_fail (GlobalSize (hdata) >= sizeof (BITMAPFILEHEADER), NULL); // <-- THE ERRANT LINE !!

            // Rest of function
          }
      }

I looked elsewhere in the same file and I soon realised that the same macro gets used in many other places. However, wherever else it gets used, it's always at the top of a function (i.e. before the main code starts). For example, this would build successfully:-

      HGLOBAL
      _gdk_win32_selection_convert_to_dib (HGLOBAL  hdata,
                           GdkAtom  target)
      {
g_return_val_if_fail (GlobalSize (hdata) >= sizeof (BITMAPFILEHEADER), NULL);

        // Rest of function
      }

Do I need to open a bug in bugzilla or is it sufficient to report the problem here?

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]