[Bf-blender-cvs] [c50e594fc47] fixed_width_integers: Fixup: linux types.

Nicholas Rishel noreply at git.blender.org
Fri Jul 2 02:09:25 CEST 2021


Commit: c50e594fc4780f316b3ff1294f2bb093fbc421ba
Author: Nicholas Rishel
Date:   Wed Jun 16 13:09:03 2021 -0700
Branches: fixed_width_integers
https://developer.blender.org/rBc50e594fc4780f316b3ff1294f2bb093fbc421ba

Fixup: linux types.

===================================================================

M	intern/ghost/intern/GHOST_SystemPathsUnix.cpp
M	intern/ghost/intern/GHOST_SystemX11.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp b/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
index ffd53819609..b58799e9c2a 100644
--- a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
@@ -86,7 +86,7 @@ const char *GHOST_SystemPathsUnix::getUserDir(int version, const char *versionst
         return NULL;
       }
     }
-    return (uint8_t *)user_path.c_str();
+    return user_path.c_str();
   }
   else {
     if (user_path.empty() || last_version != version) {
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 0fe89631966..b4e6d97cdcf 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -2143,7 +2143,7 @@ char *GHOST_SystemX11::getClipboard(bool selection) const
   Window owner;
 
   /* from xclip.c doOut() v0.11 */
-  unsigned char *sel_buf;
+  char *sel_buf;
   unsigned long sel_len = 0;
   XEvent evt;
   unsigned int context = XCLIB_XCOUT_NONE;
@@ -2162,13 +2162,13 @@ char *GHOST_SystemX11::getClipboard(bool selection) const
   owner = XGetSelectionOwner(m_display, sseln);
   if (owner == win) {
     if (sseln == m_atom.CLIPBOARD) {
-      sel_buf = (unsigned char *)malloc(strlen(txt_cut_buffer) + 1);
-      strcpy((char *)sel_buf, txt_cut_buffer);
+      sel_buf = (char *)malloc(strlen(txt_cut_buffer) + 1);
+      strcpy(sel_buf, txt_cut_buffer);
       return sel_buf;
     }
     else {
-      sel_buf = (unsigned char *)malloc(strlen(txt_select_buffer) + 1);
-      strcpy((char *)sel_buf, txt_select_buffer);
+      sel_buf = (char *)malloc(strlen(txt_select_buffer) + 1);
+      strcpy(sel_buf, txt_select_buffer);
       return sel_buf;
     }
   }
@@ -2228,8 +2228,8 @@ char *GHOST_SystemX11::getClipboard(bool selection) const
 
   if (sel_len) {
     /* Only print the buffer out, and free it, if it's not empty. */
-    unsigned char *tmp_data = (unsigned char *)malloc(sel_len + 1);
-    memcpy((char *)tmp_data, (char *)sel_buf, sel_len);
+    char *tmp_data = (char *)malloc(sel_len + 1);
+    memcpy(tmp_data, (char *)sel_buf, sel_len);
     tmp_data[sel_len] = '\0';
 
     if (sseln == m_atom.STRING)



More information about the Bf-blender-cvs mailing list