aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidterm.c
diff options
context:
space:
mode:
authorPo Lu2023-10-27 18:44:15 +0800
committerPo Lu2023-10-27 18:44:15 +0800
commitbbd4385a631d0b1127a17919e767bbbb513e1dcc (patch)
tree4db7683dbdb2017cb6349e7f07529c33b84f8b45 /src/androidterm.c
parentfe2761cf3e3f21a9c5a73686a8e21aceb13daa78 (diff)
downloademacs-bbd4385a631d0b1127a17919e767bbbb513e1dcc.tar.gz
emacs-bbd4385a631d0b1127a17919e767bbbb513e1dcc.zip
Substitute eassert for assert throughout Android code
* src/android.c (android_init_emacs_service) (android_init_emacs_pixmap, android_init_graphics_point) (android_init_emacs_drawable, android_init_emacs_window) (android_init_emacs_cursor, android_destroy_handle) (android_create_window, android_init_android_rect_class) (android_init_emacs_gc_class, android_begin_query): * src/androidselect.c (android_init_emacs_clipboard) (android_init_emacs_desktop_notification): * src/androidterm.c (getExtractedText) (android_get_surrounding_text_internal): * src/androidvfs.c (android_vfs_init): Replace assert with eassert.
Diffstat (limited to 'src/androidterm.c')
-rw-r--r--src/androidterm.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/androidterm.c b/src/androidterm.c
index 9d6517cce2b..e87f7ca2d14 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -21,7 +21,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
21#include <stdio.h> 21#include <stdio.h>
22#include <math.h> 22#include <math.h>
23#include <stdlib.h> 23#include <stdlib.h>
24#include <assert.h>
25#include <semaphore.h> 24#include <semaphore.h>
26 25
27#include "lisp.h" 26#include "lisp.h"
@@ -5602,15 +5601,15 @@ NATIVE_NAME (getExtractedText) (JNIEnv *env, jobject ignored_object,
5602 class 5601 class
5603 = (*env)->FindClass (env, ("android/view/inputmethod" 5602 = (*env)->FindClass (env, ("android/view/inputmethod"
5604 "/ExtractedTextRequest")); 5603 "/ExtractedTextRequest"));
5605 assert (class); 5604 eassert (class);
5606 5605
5607 request_class.hint_max_chars 5606 request_class.hint_max_chars
5608 = (*env)->GetFieldID (env, class, "hintMaxChars", "I"); 5607 = (*env)->GetFieldID (env, class, "hintMaxChars", "I");
5609 assert (request_class.hint_max_chars); 5608 eassert (request_class.hint_max_chars);
5610 5609
5611 request_class.token 5610 request_class.token
5612 = (*env)->GetFieldID (env, class, "token", "I"); 5611 = (*env)->GetFieldID (env, class, "token", "I");
5613 assert (request_class.token); 5612 eassert (request_class.token);
5614 5613
5615 request_class.initialized = true; 5614 request_class.initialized = true;
5616 } 5615 }
@@ -5620,12 +5619,12 @@ NATIVE_NAME (getExtractedText) (JNIEnv *env, jobject ignored_object,
5620 text_class.class 5619 text_class.class
5621 = (*env)->FindClass (env, ("android/view/inputmethod" 5620 = (*env)->FindClass (env, ("android/view/inputmethod"
5622 "/ExtractedText")); 5621 "/ExtractedText"));
5623 assert (text_class.class); 5622 eassert (text_class.class);
5624 5623
5625 class 5624 class
5626 = text_class.class 5625 = text_class.class
5627 = (*env)->NewGlobalRef (env, text_class.class); 5626 = (*env)->NewGlobalRef (env, text_class.class);
5628 assert (text_class.class); 5627 eassert (text_class.class);
5629 5628
5630 text_class.flags 5629 text_class.flags
5631 = (*env)->GetFieldID (env, class, "flags", "I"); 5630 = (*env)->GetFieldID (env, class, "flags", "I");
@@ -5924,7 +5923,7 @@ android_get_surrounding_text_internal (JNIEnv *env, jshort window,
5924 return NULL; 5923 return NULL;
5925 } 5924 }
5926#else /* __ANDROID_API__ >= 31 */ 5925#else /* __ANDROID_API__ >= 31 */
5927 assert (class); 5926 eassert (class);
5928#endif /* __ANDROID_API__ < 31 */ 5927#endif /* __ANDROID_API__ < 31 */
5929 5928
5930 class = (*env)->NewGlobalRef (env, class); 5929 class = (*env)->NewGlobalRef (env, class);
@@ -5936,7 +5935,7 @@ android_get_surrounding_text_internal (JNIEnv *env, jshort window,
5936 /* Now look for its constructor. */ 5935 /* Now look for its constructor. */
5937 constructor = (*env)->GetMethodID (env, class, "<init>", 5936 constructor = (*env)->GetMethodID (env, class, "<init>",
5938 "(Ljava/lang/CharSequence;III)V"); 5937 "(Ljava/lang/CharSequence;III)V");
5939 assert (constructor); 5938 eassert (constructor);
5940 } 5939 }
5941 5940
5942 context.before_length = before_length; 5941 context.before_length = before_length;
@@ -6032,7 +6031,7 @@ NATIVE_NAME (takeSnapshot) (JNIEnv *env, jobject object, jshort window)
6032 return NULL; 6031 return NULL;
6033 } 6032 }
6034#else /* __ANDROID_API__ >= 33 */ 6033#else /* __ANDROID_API__ >= 33 */
6035 assert (class); 6034 eassert (class);
6036#endif /* __ANDROID_API__ < 33 */ 6035#endif /* __ANDROID_API__ < 33 */
6037 6036
6038 class = (*env)->NewGlobalRef (env, class); 6037 class = (*env)->NewGlobalRef (env, class);
@@ -6044,7 +6043,7 @@ NATIVE_NAME (takeSnapshot) (JNIEnv *env, jobject object, jshort window)
6044 constructor = (*env)->GetMethodID (env, class, "<init>", 6043 constructor = (*env)->GetMethodID (env, class, "<init>",
6045 "(Landroid/view/inputmethod" 6044 "(Landroid/view/inputmethod"
6046 "/SurroundingText;III)V"); 6045 "/SurroundingText;III)V");
6047 assert (constructor); 6046 eassert (constructor);
6048 } 6047 }
6049 6048
6050 /* Try to create a TextSnapshot object. */ 6049 /* Try to create a TextSnapshot object. */