crepererum commented on code in PR #6426:
URL: https://github.com/apache/arrow-rs/pull/6426#discussion_r1905681137


##########
arrow-ipc/gen.patch:
##########
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+diff --git a/arrow-ipc/src/gen/File.rs b/arrow-ipc/src/gen/File.rs
+index 35ed13c0..427cf75d 100644
+--- a/arrow-ipc/src/gen/File.rs
++++ b/arrow-ipc/src/gen/File.rs
+@@ -66,6 +66,10 @@ impl<'b> flatbuffers::Push for Block {
+         let src = ::core::slice::from_raw_parts(self as *const Block as 
*const u8, Self::size());
+         dst.copy_from_slice(src);
+     }
++    #[inline]

Review Comment:
   Shouldn't flatbuffers 24.12.23 do that now? 



##########
arrow-ipc/regen.sh:
##########
@@ -99,31 +102,31 @@ for f in `ls *.rs`; do
     fi
 
     echo "Modifying: $f"
-    sed -i '' '/extern crate flatbuffers;/d' $f
-    sed -i '' '/use self::flatbuffers::EndianScalar;/d' $f
-    sed -i '' '/\#\[allow(unused_imports, dead_code)\]/d' $f
-    sed -i '' '/pub mod org {/d' $f
-    sed -i '' '/pub mod apache {/d' $f
-    sed -i '' '/pub mod arrow {/d' $f
-    sed -i '' '/pub mod flatbuf {/d' $f
-    sed -i '' '/}  \/\/ pub mod flatbuf/d' $f
-    sed -i '' '/}  \/\/ pub mod arrow/d' $f
-    sed -i '' '/}  \/\/ pub mod apache/d' $f
-    sed -i '' '/}  \/\/ pub mod org/d' $f
-    sed -i '' '/use core::mem;/d' $f
-    sed -i '' '/use core::cmp::Ordering;/d' $f
-    sed -i '' '/use self::flatbuffers::{EndianScalar, Follow};/d' $f
+    sed --in-place='' '/extern crate flatbuffers;/d' $f

Review Comment:
   IIRC Mac's sed (BSD utils) and the Linux coreutils sed behave differently. 
It's a bit of a pain.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to